0

Ok, here is the problem MS Excel allows me to save the whole sheet as text tab delimited I'm using this text in a program , but the user needs to make the previous step manually I want to automate this step so the user only import the Excel Book into my program , and shows how many sheets inside it letting the user select the desired sheet and then the program will convert this sheet into text (tab delimited ) , any ideas ?

enter image description here

2 Answers 2

2

Well... one of the easiest to learn methods would be the use Excel Interop. The downside of this method is it (1.) requires Excel to be installed and (2.) Can get messy very quickly... but generally it makes sense.

I suggest familiarizing yourself with Excel Interop. Now, take note of the SaveAs method for the Workbook object.

  1. Loop through the Worksheets property of the opened Workbook.
  2. Display the sheet names for the user to choose.
  3. Get the desired sheet by name and access the Worksheet object
  4. Use the desired Worksheet's Select method
  5. Use the Workbook's SaveAs method. Be sure to use FileFormat option to make it tab delimited.

Hope that helps. Just remember, it's doable.

Sign up to request clarification or add additional context in comments.

Comments

0

There are several options:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.