issue, suggestions and appeals
OpenXlSX version: Jul 3, 2022
issue
- the value of formula won't automatical update in office2016[ just show 0 ], not test in 2019 and in 365 it's fine. maybe add a function to refresh the table could work, I don't know weather it is feasible.
suggestion
- judge the file whether opened by Excel when save the file. when Excel open it, it will spawn ~$filename and can use filesystem.exists() to judge throw an error and wait for file close using cin may help
- XLWorksheet.XLCellRange(ref, ref) add a judgment here if the ref are wrong, for example left:B2 right:A1 the program will drop into a loop
appeal
- add columns, XLcolumns Im not sure why there're only about row without columns If it's not a technical problem, I sincerely hoping you can achieve this function
- deleteRow(), deleteColum() although can accomplish by self, is there a more effective way to solve it ?
other
I write a Chinese Doc a little bit simple with some wrong maybe, but it still work. helpful to the people don't want to study further
issue += 1;
.------------------------------. XLCellRange a = xxxx; for (auto b : a){ if (b xxxxx) b.value()=27; // some work some didn't } row before 27314 not work[ simplely replace to 0:00:00 ], after 27314 it work. .------------------------------. attach the code and excel I dont have the ability to solve, so, just report it.
Apologies for the late reply, but let me comment on the issues that are already addressed:
the value of formula won't automatical update in office2016
Since a year or so, all formulas should auto-refresh next time the document is opened in Excel
judge the file whether opened by Excel when save the file.
This is something about existing files that I would suggest for the user to implement themselves. But maybe could be considered as a future feature.
XLWorksheet.XLCellRange(ref, ref) add a judgment here. if the ref are wrong, for example left:B2 right:A1 the program will drop into a loop
This check has been implemented - if an XLCellRange is constructed with such a wrong reference, it will throw an exception.
add columns, XLcolumns
For styles, XLColumns is implemented - but do you want similar data access to columns as you have for XLRows? That is difficult due to the way data is organized in the OOXML.
However, you can use ranges to access and iterate over a column (e.g. XLWorksheet::range("B1:B1000")). For usage, please refer to Examples/Demo5.cpp
deleteRow(), deleteColum()
Since today in the development-aral branch, 97754951b188fe47fdb15fffdd0a1969aa72689b adds a function XLSheet::deleteRow - I will possibly add deleteColumn in the near future.
However, please be aware that due to extensive operations on the underlying XML, deleteRow currently only removes the underlying XML and does not renumber the following rows to "move up by one". TBD if this can be implemented with reasonable effort. Same for deleteColumn (where the "move to the left" seems more important)