WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: sense2k on April 20, 2015, 07:57:28 AM

Title: Grabbing excel (2010) data w/o opening excel CSV file
Post by: sense2k on April 20, 2015, 07:57:28 AM
Hello all
We have a Jet Report which uses data from an excel csv file. We want to minimize the steps needed to run the report for very non tech savvy users.  Currently we first need to open the CSV file before running the jet report.  Is there a way that Excel can be made aware of the data and cell references such that without opening the csv file, the data links function properly.  I may not be making this very clear - I hope you get the gist of it

Thanks
Title: Re: Grabbing excel (2010) data w/o opening excel CSV file
Post by: td on April 20, 2015, 01:19:02 PM
It sounds a bit like you want to load data into Excel without loading data into Excel and that, of course, is an oxymoron.   If what you mean is that you want to automate the process of loading data into Excel then that can be done using Excel's COM Automation objects.  There is a plethora of examples of doing that in the Tech Database.
Title: Re: Grabbing excel (2010) data w/o opening excel CSV file
Post by: td on April 21, 2015, 01:04:50 PM
Speaking of plethora, here is a link to but one member

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+Tutorials/OLE~TUTORIAL+Automating~Excel~Tutorial.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+Tutorials/OLE~TUTORIAL+Automating~Excel~Tutorial.txt)
Title: Re: Grabbing excel (2010) data w/o opening excel CSV file
Post by: DAG_P6 on April 30, 2015, 08:04:56 PM
What about the solution, built right into Excel, that seems tailor made for this use case?

Assuming that you open a regular Excel workbook that imports the data into a range, probably in a dedicated sheet, the import definition can specify that the data are never stored when the sheet is saved, and is read from the data source (the .CSV file) whenever the workbook is opened.