OpenXLSX icon indicating copy to clipboard operation
OpenXLSX copied to clipboard

Can't save xlsm correctly (strings)

Open attssystem opened this issue 3 years ago • 3 comments

I'm trying to open and save data in an xlsm file. I can add numbers in cells but no strings. If I try I get an error when opening, Excel has deleted records in random sheets, some string remains but in weird positions (wrong cells, wrong sheets, etc...). I tried creating only one string that ended up being deleted by Excel.

The "deletion behavior" seems to have its logic. For instance if I fill out a column with some string data, it ends up being shifted 2 rows to the bottom and the 4 first cells are being deleted.

The xlsm file is an empty document with only one macro. (It behaves the same even without the macro).

My code already worked on an xlsx file (thank you for that). So it's really the xlsm that alters data.

Thanks in advance for your help,

Hugues

attssystem avatar Dec 17 '21 10:12 attssystem

This is an issue I'm facing too. My initial reaction was maybe it doesn't read the VBA stuff properly. I really want to pursue this and get this working with full support to read and write VBA as string without corrupting the output.

SimantoR avatar Oct 11 '22 15:10 SimantoR

Unfortunately, I won't be able to help anymore. The code I was working on is the property of the company I worked in last year... I hope you'll find a solution ! I'll let the issue opened for you ;)

attssystem avatar Oct 11 '22 16:10 attssystem

That's no problem @attssystem. I wasn't aware aware that BSD-3 allows for treating derivative work as IP so I learned something new. I'm sure I can figure it out if I tinker with it long enough

SimantoR avatar Oct 11 '22 19:10 SimantoR

@attssystem. Do you also have a problem when you open xlsx gives an error? Related to /xl/sharedStrings.xml with XML error

KosmoFromWhiteStar avatar Aug 02 '23 20:08 KosmoFromWhiteStar