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

Support for Quotation Marks in Custom Formats #472

Open
daghendrik opened this issue Sep 6, 2024 · 1 comment
Open

Support for Quotation Marks in Custom Formats #472

daghendrik opened this issue Sep 6, 2024 · 1 comment

Comments

@daghendrik
Copy link

Applying formatting to a cell containing a timestamp works well, but if i add static parts to the format, I get an error.

This works:

ws.value(0, 0, LocalDateTime.now());
ws.style(0, 0).format("yyyy-MM-dd H:mm:ss").set();

This produces a workbook with corrupted formatting for the cell:

ws.value(0, 0, LocalDateTime.now());
ws.style(0, 0).format("yyyy-MM-dd H:mm:ss \"static text\"").set();

In Excel custom formatting, you can include specific text or symbols in a custom date format by surrounding them with quotation marks (" "). This text will appear exactly as written, without being interpreted by Excel.

Is there a way fastexcel can support this use case?

@meiMingle
Copy link
Collaborator

I'll take a look at this sometime

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

No branches or pull requests

2 participants