Spire.Spreadsheet is a powerful component to view spreadsheet. As a standalone spreadsheet class library, Spire.Spreadsheet is a companion component to Spire.XLS, which mainly focus on how to display spreadsheet.

Fri Oct 14, 2022 6:46 am

Hello.

I have a use case where customer is on remote server and opened Excel file made with Crystal reports to .Net WinForms application form that has Spire.Spreadsheet on it.

Customer wants to select everything from the Spire.Spreadsheet and copy-paste it to their local computer's Excel and continue working there.
We have space as thousands separator here and now when they paste the numbers > 999 to Excel they become text. And even when customer select the text cells and marks them as number they don't change because there is this white space as thousand separator. If they manually remove the space from the cell it becomes number.

If I paste the Spire.Spreadsheet data to Libre Office Calc it works well, BUT Libre Office Calc opens Text Import window for paste options as if I was importing csv file to it, and for some reason Excel doesn't ask that.

Is there any option or property that I could switch for Spire.Spreadsheet, that when I copy data it would only pick actual values from number fields and not with the visible values with thousand separator like LibreOffice Calc or Excel does? Or is there some other way around this?

Maybe if number cell types stayed as number and not custom in Spire.Spreadsheet it would copy the actual values? Now if I change cell type to number in format cells window, close the window and check the type again, it is always custom type with the #,##0.00 formula and not number.

You can test this by copying number values with thousand separator to Spire.Spreadsheet from Libre Office Calc or Excel and see that the paste values are numbers without thousand separator, but from Spire.Spreadsheet to Excel numbers with thousand separator become text because of the white space in values.

vmk_devnet
 
Posts: 3
Joined: Thu Oct 13, 2022 8:22 am

Fri Oct 14, 2022 1:31 pm

Hello,

Thanks for your inquiry.
For the issue that the thousands separator are lost after copying a number containing the thousands separator from an excel file on the local computer into a Spreadsheet, I have logged it into our product bug system with the ticket number SPREADSHEET-208. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

However, for another issue that the number become text after copying a number containing space as thousands separator from Spreadsheet to excel file on the local computer, please offer your excel file and the screenshot that shows your issue. Thanks for your assistance in advance.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Mon Oct 17, 2022 6:36 am

Hello, thanks for the reply.

First attachment:
CopyPasteToExcelScreenshots.zip

ViewerCopy.png image shows the area I have copied from Spreadsheet control.

ExcelPasteThousandSeparatorNotNumber.png shows the result right after data has been pasted to empty Excel sheet. Left alignment shows that numbers with thousand separator are in General format (I originally said wrong that they would be in text format). And right alignment on cells where value is <1000 shows that they have automatically gotten number type.

ExcelPasteThousandSeparatorNotNumberCellProperties.png image shows that cell with thousand separator is in 'Yleinen' ( = 'General' ) format. Sorry about the Finnish localization here.

I've also attached the xls file:
FromCrystalReport.zip

vmk_devnet
 
Posts: 3
Joined: Thu Oct 13, 2022 8:22 am

Mon Oct 17, 2022 11:54 am

Hello,

Thanks for your feedback.
After investigation, I reproduced your issue and logged it into our bug tracking system with the ticket number SPREADSHEET-209. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Mon Nov 14, 2022 9:49 am

Hello,

Greeting from E-iceblue.
For the issues with the number SPREADSHEET-209 and SPREADSHEET-208, I have some updates to inform you:
When copying data from Spreadsheet to MS Excel or from MS Excel to Spreadsheet, this will use the system’s pasteboard and only copying the text and not copying the style of data. Therefore, there will appear the scenario you mentioned. For these issue, we can’t achieve the effect you expected. Sorry for the inconvenience caused.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.Spreadsheet