Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Feb 02, 2017 2:29 pm

Hi,
is there a function to call to check if the Data Format received from the template file is of type "Number" or "Date"?

something like _myWorkSheet.Rows[rowNumber].Cells[j].Style.hasNumberFormat

Thanks

lsong
 
Posts: 36
Joined: Wed Feb 01, 2017 4:13 pm

Fri Feb 03, 2017 3:13 am

Dear lsong,

Thanks for your inquiry.
At present, here is a method which can return the format code, and then you can determine the type via the format code.
Code: Select all
String format = sheet.Rows[1].Cells[1].NumberFormat;

If there is any question, please let me know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Sat Feb 04, 2017 6:25 am

Dear lsong,

How is your issue now ?
Could you please give us some feedback at your convenience ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS