Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 05, 2012 02:21 AM by EricWhiteDev
Dec 03, 2012 03:56 PM|LINK
Hi, I am making a parsing program that needs to get the data from an excel document (xlsx file) and pass it into a SQL database. I am having some issues trying to figure out how to read the data from only specific columns (I don't need some of the data
from the sheet). The file is being uploaded and read from a stream so I need to use OpenXML. Is there a way to select/ignore a column with OpenXML SDK 2.0? Please keep in mind I am pretty new to MVC and OpenXML.
Dec 03, 2012 08:09 PM|LINK
I managed to figure it out. In my case I just made a variable to store the CellReference for each cell and then made a StartsWith comparison for the column name (i.e. B). I didn't think of anything that simple (and I didn't know of the StartsWith method
before starting this).
Dec 04, 2012 03:40 AM|LINK
I'll close your issue and if you have feedback things, please create another new one.
Dec 05, 2012 02:21 AM|LINK
Hi, you may be interested in the following screen-cast and code that shows a convenient way to query a spreadsheet. It is pretty easy to retrieve just the values for a specific column. The code presented in the screen-cast is written in VB.NET, but the
actual 'library' is written in C#.
You can find C# code to use the small 'library' at the following URL: