CPAN::Forum
Spreadsheet-ParseExcel - Re: Picking up cell values from incorrect worksheet
| Posted on Mon Jul 9 02:09:02 2007 by ccbc in response to 4325 (See the whole thread of 2) |
| Re: Picking up cell values from incorrect worksheet |
|
Gee, this response is a bit late, but think i just encountered the same problem, so, in my time reference, this post/response is timely :)
With chart(s?), wrong data is sometimes pulled in.
Here is what i suspect is actually happening:
The indexing of worksheets is incorrect if chart(s?) are involved. i can see the data that i expect - but on the wrong worksheet. This error also affects the max rows and columns for the sheets, i.e. retrieved for the wrong sheet, and so, depending on the order and sizes of preceding/subsequent worksheets, may allow accessing cells beyond the range of the actual worksheet, resulting in stale data being retrieved from the cell array, i.e. outside the normal range of the current worksheet.
Since one can not count on the correct name being returned for the current worksheet, nor the ranges for it, my workaround included adding a tag into cell(0,0) of the worksheet(s) to be parsed. Then i can recognize the correct worksheet by looking at contents of cell(0,0) rather than by trusting the returned worksheet name.
Also, into this same cell(0,0) i include the max rows and columns to identify the real range to parse for this worksheet. So, cell(0,0) might contain "ISIT:33:11" to identify a worksheet tag name "ISIT" and having 33 rows and 11 columns to be parsed.
Also, eliminating the chart(s) would eliminate the problem.
Unfortunately, none of the above will probably help if one has no control over the source workbook.
:(
|
| Write a response |
(7)
]