13
Views
2
Comments
[Advanced Excel] [Advanced Excel] How do I preserve the original formatting with Cell_WriteRange?
advanced-excel
Service icon
Forge asset by Carlos Freitas
Application Type
Traditional Web
Service Studio Version
11.54.62 (Build 63330)
Platform Version
11.39.0 (Build 46066)

Hello.


I'm trying to handle the following scenario using advanced_excel.


1. Load a pre-prepared Excel file.

2. Treat it as a template and replace cell values in bulk by specifying a range while preserving the original formatting.

3. Download the created Excel file.


The latest version of advanced_excel's Cell_Write has an option called PreserveFormat, which replaces cell values while preserving the original formatting.

However, Cell_WriteRange does not have such an option, and the original formatting is lost.


Is there a way to achieve this scenario?


*I can think of a way to replace values one cell at a time with Cell_Write, but I'm concerned about the performance impact.


Regards


Atsushi

2026-02-12 11-59-45
Sanket Gaikwad

Hey Atsushi, you're right. Cell_WriteRange doesn't have the PreserveFormat option, so it clears any existing styles in your template. 

For now, the only real fix i see is using Cell_Write for each cell, even though it’s slower. Since this is a community driven component, hopefully that feature gets added to the GitHub repo soon

2023-02-14 06-52-04
Atsushi Mizutani

Hi Sanket.

Thanks for your response.


I'm currently investigating app upgrades and looking for differences like this.

Is it inevitable that functions like Cell_WriteRange will behave differently with each upgrade?

I wonder if the reason the function changed this time is because of a change in Excel's specifications?


Ideally, it would be best if the functions I've been using up until now continue to work the same way as before the upgrade.


For now, I'll look forward to what the community does.


Atsushi

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.