Unplanned
Last Updated: 12 Apr 2024 13:53 by ADMIN
ADMIN
Deyan
Created on: 25 Apr 2016 18:22
Category: SpreadProcessing
Type: Feature Request
8
SpreadProcessing: Implement an option to import numbers as text from CSV
Currently, the numbers in a CSV file are parsed as numbers, and the leading zeros are lost. In MS Excel, leading zeros could be preserved when the values are imported as text using the more sophisticated text import wizard (http://www.upenn.edu/computing/da/bo/webi/qna/iv_csvLeadingZeros.html ).

Workaround: The values could be extracted using a third-party (or custom) CSV parser, and inserted manually into the model, using CellSelection.SetValueAsText method (http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/working-with-cells/cell-value-types.html ).
4 comments
ADMIN
Yoan
Posted on: 12 Apr 2024 13:53

Hello Joshua,

First of all, thank you for the provided feedback, your efforts are much appreciated.

The way we operate is we have a system that prioritizes the logged tasks in our Feedback Portal by taking into consideration various factors like demand, complexity, resources, etc. We are doing everything in our power to answer customer requests and needs by resolving these tasks as fast as possible, but some receive less attention than others, which is why they can sometimes be delayed, just like this one.

Currently, this task is not on our roadmap for the foreseeable future and I also wouldn't want to mislead you by giving you any incorrect information just for the sake of it. Once any item is resolved, we immediately update the public feedback page to notify our clients so the best thing I can offer is to subscribe to the task in order to track its progress and don't miss potential updates.

For the time being the only alternative I can offer you is the potential workaround previously provided in this thread.

Thank you for your understanding. 

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Joshua
Posted on: 11 Apr 2024 15:54

Is there still no way to do this? This is stopping me from being able to import CSV files. It mangles my original data and i cannot deduce what it is.

 

I propose a simple setting that just imports everything as is and keeps it text.

var worksheetProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.TextBased.Csv.CsvFormatProvider();
worksheetProvider.Settings.ImportAllValuesAsText = true;

using var workBook = worksheetProvider.Import(csvData);
ADMIN
Aleks
Posted on: 04 May 2023 12:22

Hi Todd,

I am Aleks and I will be happy to assist with this case. From what I have gathered you have previously reported this unexpected behavior.
I am afraid this feature has not yet been implemented.

I apologize for the inconvenience this missing functionality may have caused.

We will note down all the information provided from your side in our internal item and will keep it in mind once the development of the feature has started.

I understand that the provided workaround is not working for your scenario. In that case you can continue following this public item on any updates.

Regards,
Aleks
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Todd
Posted on: 03 May 2023 12:28

I'd like a new configuration parameter added to CsvFormatProvider to treat all CSV data as strings.

I want it to behave like Microsoft.VisualBasic.FileIO - TextFieldParser.

(note that TextFieldParser has it's own parameters like TextFieldType, Delimiters, and HasFieldsEnclosedInQuotes).