1

I have a script that converts an .xlsx file to .csv file but this script uses a cell range in Excel to read the data. The script is working but I wish to expand it to prevent possible user-bugs.

The query to select a Excel cell range (in SQL):

  string query = "SELECT * FROM fileName";

What I'm trying to do is make the script select an 'ALL' kind of range so that if a user changes the filename it still works. Like this:

  string query = "SELECT * FROM User_*";

User_ will be standard for every document but what comes after the _ can be changed by the users. Using * is not accepted as ALL in this case, and I can't seem to find something that works.

pnuts
  • 58,317
  • 11
  • 87
  • 139
Alim
  • 227
  • 1
  • 4
  • 18

1 Answers1

0

I used another script to run an Excel macro on the document before converting it. This macro changed the name of the cell range to a common name that is now used to convert the document.

Alim
  • 227
  • 1
  • 4
  • 18