Page 1 of 1

Smart Marker and leading 0

PostPosted: Sun Dec 22, 2019 12:42 pm
by zsuiteaaron
I am trying to generate a XLS with zip codes which have leading 0's.

I have a Marker Designer template setup and the data is populating, but I cannot find a way to preserve the leading 0's.

I have set the field type in excel to text, but only the initial field retains the leading 0, each subsequent field takes on number formatting.
I have tried setting the sheet.column.numberformat to "00000" but the numbers get rounded.
I have tried setting the wraptext to true but it does not help.

Is there a way to user Marker Designer templates and force a field to be text and retain leading 0's?.

Re: Smart Marker and leading 0

PostPosted: Mon Dec 23, 2019 10:50 am
by Amber.Gu
Hi,

Thanks for your inquiry.
Below is the code for setting the number format as text:
Code: Select all
            sheet.AllocatedRange.NumberFormat = "@";

However, I tested this code with Spire.XLS Pack(Hotfix) Version:9.12.20, I found the text format could be set correctly but the leading zero still lost. I have logged this issue into our bug tracking system, once there is any progress, we will inform you.
Sorry for the inconvenience caused.

Best wishes,
Amber
E-iceblue support team

Re: Smart Marker and leading 0

PostPosted: Tue Jan 07, 2020 10:37 am
by Amber.Gu
Hi,

Hope you are doing well.
Glad to tell you that the previous issue had been resolved in Spire.XLS Pack(Hotfix) Version:10.1.1. Welcome to download and test it from the following link: https://www.e-iceblue.com/Download/download-excel-for-net-now.html

Best wishes,
Amber
E-iceblue support team

Re: Smart Marker and leading 0

PostPosted: Sun Jan 19, 2020 10:54 am
by Amber.Gu
Hi,

Greetings from E-iceblue.
Have you downloaded and tried Spire.XLS Pack(Hotfix) Version:10.1.1? Does it solve your issue?
Could you please give us some feedback at your convenience?

Best wishes,
Amber
E-iceblue support team