Hi guys,

To make Some things easier, I want to make a program that can do the following:
1. Import a .txt file to a specific .xls file. The .txt file contains several lines of data which is build like this: (aaaa,bbbb,cccc,etc.) sererated by comma. Imported in excel, I would like to split the lines in columns, like this: (column A: aaaa, column B: bbbb, column C: cccc, etc).
2. When this is done, the user can give in, for example column B, an option. When the user clicks on a button, the columns E and F should give Yes or No. This process has to be called from a .dll file. The code is than more protected for others.

The questions are:
- How can I manage the import from a .txt file to excel?
- How van I build a .dll file to do the action. Sbould I build it in Vb.net or just with basics in excel?
- How can I call the .dll file to work in excel?

Examples should be very nice, than I have a starting point to build my program.

Thanx in advance!

Sneaky Pete

If your file consists of nothing but records of comma separated values then Excel can open it directly.

Hello Sneaky Pete,

Try this: .txt to .xlsx

Process.Start("Excel", Label1.Text)

Label1.Text is a path of your .txt file.

-Zelrick

I recommend you to consider using third party library to operate Excel in .NET, which will save you the time and energy. You could try free excel component if it meets your demand.

A third party library is certainly not required here. If the OP can be more specific with expected input and output I'm sure we can help with a solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.