Just fishing for thoughts
-
I'm working on a program for some of my coworkers that take inventory with hand held scanners. I've been able to download the text file from the scanner and play around with that, but now I'm to the part where the users need to be able to view, edit, and update the records because sometimes the data isn't always accurate. I'm trying to set this up where the records are saved in an excel file. Using an OleDB data adapter I can access the xls file and place it nicely into the gridview, and I'm sure with a little bit of elbow grease I'll be able to wire up the events to update and save the modifiled cells back. My question here is, is there a better way to do this? For example, is there a way in which I can just start excel.exe and embed it into my windows form instead of using OleDB? Thanks everyone!
"You're damned if you do, and you're damned if you dont" - Bart Simpson
-
I'm working on a program for some of my coworkers that take inventory with hand held scanners. I've been able to download the text file from the scanner and play around with that, but now I'm to the part where the users need to be able to view, edit, and update the records because sometimes the data isn't always accurate. I'm trying to set this up where the records are saved in an excel file. Using an OleDB data adapter I can access the xls file and place it nicely into the gridview, and I'm sure with a little bit of elbow grease I'll be able to wire up the events to update and save the modifiled cells back. My question here is, is there a better way to do this? For example, is there a way in which I can just start excel.exe and embed it into my windows form instead of using OleDB? Thanks everyone!
"You're damned if you do, and you're damned if you dont" - Bart Simpson
Might you not use some sort of database at the back end instead of Excel?
Regards, Rob Philpott.
-
Might you not use some sort of database at the back end instead of Excel?
Regards, Rob Philpott.
Hi Rob, I thought of just using a SQL server at first, but one of my objectives is to give the users the ability to export everything to an excel document. That's why I figured It would make the most sense to just read and write straight to the xls file rather than first importing everything into SQL to then turn around, read it all back out and then write it to the xls. I think what I will eventually do is just use System.Diagnostic.Process to start up excel opening the file after I've done what I need to do with it.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
-
Hi Rob, I thought of just using a SQL server at first, but one of my objectives is to give the users the ability to export everything to an excel document. That's why I figured It would make the most sense to just read and write straight to the xls file rather than first importing everything into SQL to then turn around, read it all back out and then write it to the xls. I think what I will eventually do is just use System.Diagnostic.Process to start up excel opening the file after I've done what I need to do with it.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
Excel makes for a lousy database. There's a limited number of rows you can put into an Excel sheet, and there is also the constraint of memory. You may eventually find out you made a mistake by going with Excel.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Excel makes for a lousy database. There's a limited number of rows you can put into an Excel sheet, and there is also the constraint of memory. You may eventually find out you made a mistake by going with Excel.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Hi Dave, Ah, I was unaware of the row limitations. Thanks for the warning. To make sure I don't cramp my programs room for growth I've decided to go with a SQL database and just add a button to allow the users to export the gridview to excel.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
-
I'm working on a program for some of my coworkers that take inventory with hand held scanners. I've been able to download the text file from the scanner and play around with that, but now I'm to the part where the users need to be able to view, edit, and update the records because sometimes the data isn't always accurate. I'm trying to set this up where the records are saved in an excel file. Using an OleDB data adapter I can access the xls file and place it nicely into the gridview, and I'm sure with a little bit of elbow grease I'll be able to wire up the events to update and save the modifiled cells back. My question here is, is there a better way to do this? For example, is there a way in which I can just start excel.exe and embed it into my windows form instead of using OleDB? Thanks everyone!
"You're damned if you do, and you're damned if you dont" - Bart Simpson
Most of the times, "Export to Excel" as a requirement is made by persons who have no understanding of technical issues. Which is a bonus for programmers in this case, it is trivial to export to CSV and 99.99% of end-users don't know the difference and those that do don't care. With that issue out of the way embed into SQL Express, it will make your life easier.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.