PDA

View Full Version : Insert Column into Excel Spreadsheet



agconnell
27th October 2020, 21:43
There doesn't seem to be a way to insert a column (or row) into an excel spreadsheet using the QXLSX library. I feel like it should be simple, am I missing something? The Document class has methods for inserting images, charts, sheets, but not rows and columns?!?!

Thanks in advance.

ChrisW67
28th October 2020, 08:31
A row or column is not part of a workbook/document in Excel, so it is not overly surprising that these function are "missing" in this third party library's document class. I have never used this library and I cannot see an obvious way to do what you ask. I would have expected something in the Worksheet class, or maybe CellRange. The support seems very much tied to the concrete representation in XML.

If you are developing for Windows you can use the Excel object interface through ActiveQt to gain complete Excel capability (at the cost of having Excel installed).