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

feat: add shared formula logic #418

Closed
wants to merge 7 commits into from
Closed

feat: add shared formula logic #418

wants to merge 7 commits into from

Conversation

ling7334
Copy link
Contributor

@ling7334 ling7334 commented Apr 2, 2024

As #391 mentioned, f tag can use shared formula which doesn't has real value.
formula need to be calculated, and offset can either be in row or column.

In this PR, load_shared_formula doesn't applied, because it take a full scan of file.

@ling7334 ling7334 marked this pull request as draft April 9, 2024 07:02
Cargo.toml Show resolved Hide resolved
}
if shared_index.is_some() && shared_ref.is_none() {
// shared formula
let cell_regex = Regex::new(r"[A-Z]+[0-9]+").unwrap();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't build regex in a loop.

if shared_ref.is_none() {
// shared formula
let cell_regex =
Regex::new(r"\b[A-Z]{1,3}\d+\b").unwrap();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not build it in a loop.

@ling7334
Copy link
Contributor Author

close this PR for trying anoter concept.

@ling7334 ling7334 closed this Apr 15, 2024
@ling7334 ling7334 deleted the master branch April 15, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants