In my case I can infer the formula by comparing the source and destination values to get the multiplier value (e.g. 125%).
In my case I can infer the formula by comparing the source and destination values to get the multiplier value (e.g. 125%).
I think that ExcelDataReader would be a good name for both the namespace and the dll.The namespace should contain a prefix before the product itself. I found this library when I was about to develop something I would have called [MyEmployer].ExcelFileReader, but without the prefix, a clash might happen too easily, imo.
This issue is not coming because of formats dictionary.
It is because of adding logs in LogManager.cs file.
To resolve this issue, put a condition whether key is already present or not at line no. 48 in LogManager.cs file.
if(!_dictionary.ContainsKey(objectName))
_dictionary.Add(objectName, result);
I was facing the same issue and it got resolved with this update.
FileStream stream = File.Open(ExcelSourceFile, FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = Path.GetExtension(ExcelSourceFile).ToLower() == ".xls" ? ExcelReaderFactory.CreateBinaryReader(stream) :ExcelReaderFactory.CreateOpenXmlReader(stream);
DataSet ds = new DataSet();
ds = excelReader.AsDataSet();
DataRowCollection drc = ds.Tables[0].Rows;
int j=0;
for (int i = 0; i < rows; i++)
{
foreach (DataColumn column in ds.Tables[0].Columns)
{
DataFromExcel[i, j] = ds.Tables[0].Rows[i][j];
j++;
}
}
There might be some stuff from my previous tries. I know it must be the easiest thing to do with this library but I can't find the correct method. Hope someone can find few minutes to write it down.Hi. Do you have any progress on this issue, how can I help you to promote it to the code?
You may be best off reading it use the idatareader interface rather than a dataset. It will be quicker anyway. Not sure why you are getting null reference exceptions off top of my head though.
From: MikeKrop
FileStream stream = File.Open(ExcelSourceFile, FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = Path.GetExtension(ExcelSourceFile).ToLower() == ".xls" ? ExcelReaderFactory.CreateBinaryReader(stream) :ExcelReaderFactory.CreateOpenXmlReader(stream);
DataSet ds = new DataSet();
ds = excelReader.AsDataSet();
DataRowCollection drc = ds.Tables[0].Rows;
int j=0;
for (int i = 0; i < rows; i++)
{
foreach (DataColumn column in ds.Tables[0].Columns)
{
DataFromExcel[i, j] = ds.Tables[0].Rows[i][j];
j++;
}
}
There might be some stuff from my previous tries. I know it must be the easiest thing to do with this library but I can't find the correct method. Hope someone can find few minutes to write it down.Read the full discussion online.
To add a post to this discussion, reply to this email ([email removed])
To start a new discussion for this project, email [email removed]
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online atcodeplex.com
I am too busy with project work to spend any time on this at the moment.
What I really need to do is move the whole thing to github, then you could submit a pull request.
The only other way you could help is to get access to modify the code. To do that you'd have to email https://www.codeplex.com/site/users/view/ExcelDataReader . Unfortunately, although I am pretty much the only developer active on this project I do not have permissions to add users, and I have no idea who "ExcelDataReader" actually is...Another reason I want to move this to github.