Posts

Showing posts from October, 2015

Excel Regular Expression Parsing

Sample piece of code to parse Excel files with regular expressions using Excel Query (The first piece does not loop through all the rows to make it more efficient and fetches the resultant set based on the first row. The second piece goes through all the columns and finds a match): //This piece uses ExcelQuery --> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.IO; using System.Text; using System.Web.UI; using System.Text.RegularExpressions; using System.Web.UI.WebControls; using Scanning; using System.Data; using Innovative.Data; //Install ExcelQuery namespace WebApplication1 {     public partial class WebForm1 : System.Web.UI. Page     {          protected void Page_Load( object sender, EventArgs e)         {             ExcelQuery excelQuery = new ExcelQuery ( "C:\\Test\\Test.xlsx" );             excelQuery.HeaderHasFieldNames = true ;