Best way to load a tab separated file into a dataset?

Hi,
I’m doing automated mail merge using existing template files and existing data files.
The data files are tab-separated text files.
To get started, I cheated and used Aspose.Cells to load and then converted the data in the Cells object to a DataSet to use as data source. It was very easy to do, and it was very fast, so it was a quick win for testing that the mail merge worked as expected.

However: The load via Excel strips off whitespace and interprets e.g. numbers as numbers.
And that’s fatal.

The formatting in the mail merges depends on the data being loaded exactly as written in the file, with leading and trailing spaces, tabs, etc within the data preserved exactly as written.

There are no options to do this within Aspose.Cells. I need to find an alternative method for loading the file. Do you have any recommended method for loading such data files?

Be warned: The files are quite complex. I know there are merge fields containing both tabs, line breaks and quotes within a single data field. For that reason, all the data fields are quoted, and those outer quotes are the ONLY thing that needs removing.
The files can be large, so speed is important too.

A data loader as fast as the one in the Cells library but without the data interpretation would be ideal.
But I can’t see that happening. Preserving the original literal data would not be important when creating an Excel sheet.

@KarinMX,

Please compress the following resources into ZIP format and attach the .zip file here for testing:

  • A simplified source Word DOCX document
  • A simplified data file covering all possible scenarios
  • Aspose.Words generated DOCX file showing the undesired output
  • Your expected DOCX file showing the desired output. You can create this file manually by using MS Word.
  • Based on your current approach, please also create a standalone simplified Console Application (source code without compilation errors) that helps us to reproduce this problem on our end and attach it here for testing. Please do not include Aspose.Words and Aspose.Cells DLL files in it to reduce the file size.

As soon as you get these pieces of information ready, we will then start further investigation into your particular scenario and provide you more information.