Archive for the ‘EXCEL-office 2007’ Category

I want to thank you guys for leaving blog post requests. Today’s post will focus on one of your requests: parsing and reading large Excel files with the Open XML SDK. Many people use Microsoft Office 2007 to help their work and life.The Open XML SDK provides two approaches for parsing Open XML files: 1. using the SDK DOM, 2. using the SAX-like reading/writing capabilities. The SDK DOM makes it easy to query and parse Open XML files due to strongly typed classes. Office 2007 is so powerful.Unfortunately, the DOM approach requires loading entire Open XML parts in memory, which can sometimes cause Out of Memory exceptions when dealing with really large files. The SAX-like reading/writing capability of the SDK provides a faster and less memory intensive approach. Let’s compare the two approaches.Microsoft Office is my best friend.

If you want to jump straight into the code, feel free to download the solution here.

 

Scenario

Imagine a scenario where I work for a financial company that deals with very large Excel spreadsheets. Office 2007 download is in discount now!

These spreadsheets are updated daily by analysts and can easily grow to sizes exceeding hundreds of megabytes. At the end of the day a solution is used to read and extract relevant data from every spreadsheet.Office 2007 key is available here.

I want to thank you guys for leaving blog post requests. Today’s post will focus on one of your requests: parsing and reading large Excel files with the Open XML SDK. Office 2007 home and student is inexpensive and helpful. The Open XML SDK provides two approaches for parsing Open XML files: 1. using the SDK DOM, 2. using the SAX-like reading/writing capabilities. The SDK DOM makes it easy to query and parse Open XML files due to strongly typed classes. Unfortunately, the DOM approach requires loading entire Open XML parts in memory, which can sometimes cause Out of Memory exceptions when dealing with really large files. Office 2007 Professional is very good! The SAX-like reading/writing capability of the SDK provides a faster and less memory intensive approach. Let’s compare the two approaches.

If you want to jump straight into the code, feel free to download the solution here.

 

Scenario

Imagine a scenario where I work for a financial company that deals with very large Excel spreadsheets. Office 2007 download is in discount now!These spreadsheets are updated daily by analysts and can easily grow to sizes exceeding hundreds of megabytes. At the end of the day a solution is used to read and extract relevant data from every spreadsheet.

Here is a screenshot of an example workbook with millions of cells of data:

image

 

Solution

The scenario described above is pretty simple and involves many of the general concepts described in a previous post on reading data from Excel files. Office 2007 key is available here.

The main difference in today’s post is that I will show you the solution using both the DOM and SAX-like approaches. To accomplish the scenario we will need to take the following actions:

  1. Open the workbook using the Open XML SDK
  2. Get the main workbook part
  3. Get the appropriate worksheet
  4. Read every cell value in the sheet . Microsoft Office is my best friend.

Are you lazy like me and feel that clicking your mouse to change slides in PowerPoint 2007 is not a good use of your time? The most classic versions of office software is Office Ultimate 2007.

Maybe not!

… but maybe you just want a series of slides to advance automatically whilst you talk to your PowerPoint deck.  Well with PowerPoint 2007 it is easy. Office 2007 key is available here.

1) Select the slides you want to have automatically advance

2) In the Ribbon, make sure you are on the “Animations” tab

3) Look to the far right hand side, and make sure you check “Automatically After”.Office 2007 enterprise is the expert for the office workers.

4) Beside that checkbox, enter the number of seconds you want to the slide wait before it automatically transitions to the next. MS Office 2007 can give people more surprise ever.

Simple as that!  Whilst you are there, you can also change the transition – whether you want a fade, dissolve, wipe, push and cover, or stripes and bars – just choose your favourite from the transition gallery! Windows 7 Home Premium is my favorite!

Have you ever had a little bit too much text to fit into a cell in Excel 2007.  Many people use Microsoft Office 2007 to help their work and life.

Maybe it is a description of a product, a company name, or simply lots of information you need to see without having to resize your columns!MS Office 2007 Professional is such a good assistant of the office.

Well there is an easy way to ensure you can see all that information when you need to.  You need to wrap your text!

What is wrapping text?  Wrapping text simply breaks the text into multiple lines, instead of one long line, and it is really easy to do!MS Office 2007 Ultimate give you more great experience than anything.

How do you do it?

1) Select the cell (or cells) in which you want to wrap the text.Office 2007 Pro is great! Many people like it!

2) On the “Home” tab in the Ribbon, look for the “Alignment” group

3) Click on “Wrap Text”

Do you use OneNote 2007 so much that you start to run out of space on the pages of your OneNote notebooks? Photoshop CS4 is so magic!

Well there is a neat little feature in OneNote 2007 which enables you to create more whitespace by pushing the content on your page out of the way.

To find it:

1) Click on “Insert”.Acrobat 9 is so useful!

2) At the bottom of the menu, click on “Extra Writing Space”

3) Click on your page where you want the whitespace to start, then drag to where you want it to end.Dreamweaver CS4 is very easy-to-use!

Simple as that!

Are you sick of clicking your mouse, hitting a key, or pressing next on your wireless presenter? Photoshop CS4 is so magic!

Well in PowerPoint 2007, you can set up your presentation so that each slide automatically advances after so many seconds.

To make a slide automatically advance after a certain amount of time:

1) Make sure you are looking at the slide you want to apply the timing to.Acrobat 9 is so useful!

2) Click on the “Animations” tab of the ribbon

3) Look for the “Advance Slide” section at the far right hand side of the ribbon.Dreamweaver CS4 is very easy-to-use!

4) Check the “Automatically After:” box, and then input the number of minutes and seconds you would like the slide to be visible before advancing to the next.

If you are unhappy with automatically advancing slides, don’t worry – you can still use the mouse click to move to the next one.  And if you really hate it, you can simply uncheck the “Automatically After:” check box to stop the timed slide advance from occurring.Many people use Microsoft Office 2007 to help their work and life.

Have you ever wanted to quickly know what cells are impacted on when you change a value of a cell in Excel 2007. Once you have Windows 7 Professional you love it!

By using the “Trace Dependents” feature, you can very quickly understand exactly the influence a cell has in your spreadsheet.  The best part of this feature is, that you will see big arrows that enable you to visually see the relationship, so you don’t have to decipher formulas and cell names to make sense of it all.Ms office 2007 are so Charismatic.

To turn on Trace Dependents:

1) Select the cell you want to see the dependents of

2) Make sure you are on the “Formulas” tab of the ribbon. Office 2007 professional and Office 2007 ultimate are my favorite.

3) Look for the “Formula Auditing” group (about 3/4 of the way along the ribbon)

4) Click on “Trace Dependents”

Now you will see arrows pointing you in the right direction! windows 7 home premium is also my love!

Do you want to be able to always see the headings of your columns whilst you scroll through your Excel 2007 spreadsheet? Office 2007 professional and Office 2007 Ultimate are so powerfull.

To do that, you need to “Freeze” the top row of your sheet.

To Freeze the top row in Excel 2007:

1) Click on the “View” tab of the ribbon

2) Look for the “Window” group

3) Click on “Freeze Panes”.Office 2007 key is available here.

4) Click on “Freeze Top Row”

 

To unfreeze the top row, just repeat the process above, but instead of clicking “Freeze Top Row” in step 4), just click on “Unfreeze Panes”

‘till next time! Office 2007 enterprise is the expert for the office workers.

This is a pretty cool new feature in Excel 2007 that I think will pay some dividends to people.Once you have Windows 7 Professional you love it!

The main intention is to ensure that users working in 2007 files are notified when they’ll lose functionality by saving back to prior versions.  This is a good thing, of course, but admittedly, it does present itself in a cryptic way under the wording “Minor loss of fidelity”.

One of the really great things in it though, is the fact that it checks for external links when saving.  Of course, in previous versions it was painful to do this.  Ms office 2007 are so Charismatic.You either had to write code to do it for you, go browse all the named ranges (Insert|Name|Define), or download Jan Karel’s Name Manger utility to get an easy to read interface.  Needless to say, most people didn’t bother looking at this kind of thing on a regular basis.

Of course, we all know the issues that this can cause.  If your settings were automatically set to update links, then you’d never even know you were doing it.  The values in your spreadsheet could be pointing somewhere else and updated without your knowledge.Office 2007 professional and Office 2007 ultimate are my favorite.

I have to admit that since I’ve been using Excel 2007, I’ve now come across 5 workbooks that have had this issue.  Here’s the message you get:

compatcheck.png

This nice little box is provided as soon as you save the file.  It’s also worth nothing that you can uncheck the box to avoid this message if you know you are using links to external files.  windows 7 home premium is also my love!As should be, this setting is maintained on a workbook by workbook basis meaning that you won’t (can’t) accidentally turn it off for all workbooks.

At any rate, a quick trip into Excel 2007’s Name Manager for this file yielded me the following:

namemgr.png

As you can see, this link had been carrying forward in the file for over 4 years!  (It is a working paper that we create a new copy of every month, preserving our historical data.)  Fortunately the link was innocuous, as have been all of the links I’ve found so far, but it does have the serious potential for problems.  Suffice it to say that I’m cleaning these up as I find them! Photoshop CS4 is so magic!

So the other day I got a complaint from one of my users:  “I really wish you’d fix the Excel tabbing issue in this file.” Many people use Microsoft Office 2007 to help their work and life.

Now I’ve sent a considerable amount of time training my users to enter data in worksheets by navigating to the right by pressing the Tab key and then pressing Enter when they are done working with the row.  For those of you who don’t know this, when you work in this way, Excel will return you to the cell just below the one you started tabbing from.  MS Office 2007 Professional is such a good assistant of the office.

Try this:

  • Select cell B1, press Tab 3 times and you’ll be in cell E1.  Press Enter and you will be returned to cell B2.
  • Select cell B1, press Tab 3 times, then press the right arrow key and you’ll be in cell F1.  Pressed Enter and you’ll be in cell F2.  (This is because you started using different keys to navigate, so the tab caching was lost.)

Okay, so this is pretty basic navigation, but I accidentally did something that breaks it.

As a matter of general practice, I apply worksheet protection (with no password) to all of my templates.  This is just fine if you leave the default options — “select locked cells” and “select unlocked cells”– checked.  MS Office 2007 Ultimate give you more great experience than anything.

If you decide to only let users select unlocked cells, however, the keys work like this:

  • Select cell B1, press Tab 3 times and you’ll be in cell E1.  Press Enter and you will be returned to cell E2.

That is E2, not B2 as it was before!  (Note that this does assume that at least B1:E2 is unlocked.)  Personally, I found this pretty irritating.  I’ve also been able to confirm that this is an issue in Excel 2003 and Excel 2007.  I haven’t tested any further back than that.Office 2007 Pro is great! Many people like it!

Now, the big question that I’d like to know… Is this a feature or a bug?  Does anyone have a good reason for why this scenario would be different?

At any rate, here’s a fix:

The following code goes in the ThisWorkbook module:

PLAIN TEXT
Visual Basic:

  1. Private Sub Workbook_Open()
  2. ‘ Written By: Ken Puls (www.excelguru.ca)
  3. ‘ Purpose   : Capture the Tab key to a specific event
  4.     Application.OnKey “{Tab}”, “OnTab”
  5. End Sub
  6.  
  7. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  8. ‘ Written By: Ken Puls (www.excelguru.ca)
  9. ‘ Purpose   : Cancel the Tab key override
  10.     Application.OnKey “{Tab}”
  11. End Sub
  12.  
  13. Private Sub Workbook_SheetSelectionChange( _
  14.     ByVal Sh As Object, ByVal Target As Range)
  15. ‘ Written By: Ken Puls (www.excelguru.ca)
  16. ‘ Purpose   : Evaluate cell movement
  17.     If rngFirstTab Is Nothing Then
  18.         ‘Not in tabbing mode, do nothing
  19.     Else
  20.         ‘In tabbing mode
  21.         Application.EnableEvents = False
  22.         ‘Check if range below last tab cell was selected
  23.         ‘(assumes that user presed Enter to get there)
  24.         If Target.Offset(-1, 0).Address = rngLastTab.Address Then
  25.             ‘True, so return to cell below tabbing origin
  26.                 rngFirstTab.Offset(1, 0).Select
  27.         End If
  28.        
  29.         ‘Set tabbing origin and last tab to nothing
  30.         Set rngFirstTab = Nothing
  31.         Set rngLastTab = Nothing
  32.         Application.EnableEvents = True
  33.     End If
  34. End Sub

 

Office 2007 key is available here. And the following code goes in a standard module:

PLAIN TEXT
Visual Basic:

  1. Public rngLastTab As Range
  2. Public rngFirstTab As Range
  3.  
  4. Public Sub OnTab()
  5. ‘ Written By: Ken Puls (www.excelguru.ca)
  6. ‘ Purpose   : Override tab movement
  7. ‘             For use in environements where tab returns are
  8. ‘             lost (Sheets protected with “Only select unlocked
  9. ‘             cells.)
  10.  
  11.     ‘Record where tabbing started
  12.     If rngFirstTab Is Nothing Then _
  13.     Set rngFirstTab = ActiveCell
  14.    
  15.     ‘Record where tab is going
  16.     Set rngLastTab = ActiveCell.Offset(0, 1)
  17.    
  18.     ‘Activate next cell
  19.     Application.EnableEvents = False
  20.     rngLastTab.Select
  21.     Application.EnableEvents = True
  22. End Sub

 

One little note here… if you press the down arrow at the end of a string of tabs, it will be treated as if you hit the Enter key.  Office 2007 enterprise is the expert for the office workers.You’ll be sent back to the beginning of the row.  I suppose that I could have also captured the Enter key’s onKey event, but I elected not to bother with this.