Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue, suggestions and appeals #214

Open
Eyderoe opened this issue Apr 21, 2023 · 2 comments
Open

issue, suggestions and appeals #214

Eyderoe opened this issue Apr 21, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Eyderoe
Copy link

Eyderoe commented Apr 21, 2023

OpenXlSX version: Jul 3, 2022

issue

  1. 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

  1. 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
  2. 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

  1. 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
  2. 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

文档.xlsx

@Eyderoe
Copy link
Author

Eyderoe commented Apr 21, 2023

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.

code.txt
copy.xlsx

@Eyderoe Eyderoe closed this as completed Apr 21, 2023
@Eyderoe Eyderoe reopened this Apr 21, 2023
@aral-matrix
Copy link
Collaborator

aral-matrix commented Jan 11, 2025

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, 9775495 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)

@aral-matrix aral-matrix added the enhancement New feature or request label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants