We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Import to Excel Spreadsheet from Text File

Is XlsIO able to import from a text file into an Excel spreadsheet?

I have text files (there are no file extensions, only names) which are semi-colon or tab-delimited files. I need to import the data into Excel spreadsheets and in some cases to databases too.

I can import the data to databases using OLEDB.ACE.12.0, and right now, the files are being converted and loaded using VBA macros which run unattended every night. This is a poor practice and I'd like to eliminate the need for the Office suite on the server.

I haven't found a library which can convert text files into xls-format files yet. I have one which uses the OpenXML format and the OpenDocuments library to import text files but it only creates xlsx files. If XlsIO can do the same job and save as an xls-format file (Excel 97-2003 format), then I'll switch.

Nothing in the documentation indicates the ability to import from a text file; I did find documentation for importing from a data table, but I'd like a library which doesn't need that interim step.

Any information greatly appreciated, and thanks in advance!

Warm regards,

3 Replies

SS Sridhar Sukumar Syncfusion Team May 17, 2016 10:49 AM UTC

Hi Josh, 
Thank you for contacting Syncfusion support. 

Regarding Importing data from text file: 

Yes, you can able to import data from a text file (with separator) into an Excel spreadsheet using XlsIO. We have shared a sample illustrating this behavior for your reference which can be downloaded from the following link.   

Please try this sample and let us know whether your requirement is achieved. 

Regarding Exporting to DataTable : 

Yes, you can export the imported data from the text file to a DataTable using ExportDataTable method and a brief explanation for exporting worksheet to the DataTable is available in the following UG documentation link. 

Please let us know if you have any concerns. 

Sridhar S 

JH Josh Hill May 18, 2016 04:31 PM UTC

Hi, Sridhar,

Thank you for your response. I'm having trouble with the solutions, however. The VS 2013 version won't load in VS2013, and the 2012 version can't find the assemblies required for the examples.

I'm sorry, I must have missed something. Do I need to first download the library before I can use the examples? Are the assemblies not part of the samples?

Let me know how to use them and I'll be glad to look them over. If I need to download the assemblies, please let me know and I'll get that done as soon as possible.

Sorry for my ignorance on this, and thank you again for your help.

Warm regards,

SS Sridhar Sukumar Syncfusion Team May 19, 2016 06:27 AM UTC

Hi Josh, 
Regarding VS 2013 solution issue: 
Due to some improper project settings, you might not be able to open Visual Studio 2013 solution file in Visual Studio 2013. So, we have modified the sample in which solution files will be opened in their respective Visual Studio version. The modified sample file can be downloaded from the following link.  
Regarding assembly reference issue: 
Yes, you need to install Syncfusion Essential studio in your machine to run this sample. The latest version of Syncfusion Essential studio can be downloaded  from the following link: 
The following assemblies must be referred from GAC to run this sample 
·       Syncfusion.Compression.Base 
·       Syncfusion.XlsIO.Base 
To know more about assemblies required, please refer the following UG documentation link. 
Please let us know if you have any concerns. 
Sridhar S 

Live Chat Icon For mobile
Up arrow icon