Sasha95 / excellibrary

Automatically exported from code.google.com/p/excellibrary
0 stars 0 forks source link

'Unreadable content' Office 2003 #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
My application is designed to compile a single report out of multiple files 
containing data pulled from our database.

This is achieved by:

* setting a string to the path of the required file, opening it in one instance 
of Workbook

* Adding a new worksheet to the final workbook

* Setting the new worksheet to the single worksheet in the first workbook. 
(workbook1.worksheet[4] = workbook1.worksheet[0])

After saving an XLS file and opening it in Excel 2003, it displays an 
'Unreadable Content' error, and asks if i would like to recover.

When recovering the 'damaged' file, all of the added worksheets have garbage 
for names, and i get a few additional worksheets labeled 'recovered worksheet 
X'.

The data in the worksheets seem to be intact, though i haven't bothered with 
checking to make sure of it.

Any help would be greatly appreciated.

Original issue reported on code.google.com by redvets....@gmail.com on 11 Jul 2011 at 3:11

GoogleCodeExporter commented 9 years ago
The 'workbook =' example contains a typo, that is not actual code in my app.

Also, this is not a web application, its a Win32 forms application.

Original comment by redvets....@gmail.com on 11 Jul 2011 at 3:13

GoogleCodeExporter commented 9 years ago
My problem was being caused due to multiple Worksheets with the same name.

After fixing the duplicate naming, it runs fine.

Thanks for the awesome library!

Original comment by redvets....@gmail.com on 11 Jul 2011 at 5:28