Click here to Skip to main content
15,889,266 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Guys i have literally tried so much research my head is about to explode. can someone please help me in this matter. I have multiple excel spreadsheets with 100000 plus rows and 27+ columns. i want to dynamically create tables, and columns and insert the excel into the access db. Is there any code example i can use. or has someone worked with this that i can use please? thank you in advance.

What I have tried:

Way too much research leading to nothing.
Posted
Updated 3-Mar-17 5:29am
v2
Comments
CHill60 3-Mar-17 11:23am    
I'm afraid this is not a code-writing service. Do you know how to open an excel spreadsheet? Do you know how to connect to Access? What is your actual problem (that could warrant a Quick Answer)?
JT1992 3-Mar-17 11:27am    
yes i know how to open an excel spreadsheet but how can i connect to access and basically copy that excel spreadsheet create a table using the column names dynamically and then insert all the rows within each column. all row cells will be in a text format. i really need help sir anything will do.
[no name] 3-Mar-17 11:27am    
"i need professional help and code project has amazing people", well yeah but no one is going to sit down and write this for you. Open your excel sheet, open your access database, query excel, write to access.
JT1992 3-Mar-17 11:28am    
i dont know how to open access and do the querying.
[no name] 3-Mar-17 11:30am    
Sorry? I could swear you said you researched this.

1 solution

You already know how to read the data: System out of memory exception when loading an excel spreadsheet with 100000+ rows with 25 columns or more to a gridview[^] - all you have to do is save the DataTable to Access - which is pretty trivial: save the DataTable to Access - Google Search[^]
Provided you don't try to display all that data, you'll be fine.
 
Share this answer
 
Comments
JT1992 3-Mar-17 11:32am    
i really dont know how to create different tables with different column names dynamically depending on spreadsheet. please help i am really lost.
OriginalGriff 3-Mar-17 11:38am    
Why not? What part of the process is a problem?
Can you create a table in Access from your C#?
JT1992 3-Mar-17 11:39am    
thats the issue i cant create a table dynamically. each spreadsheet will have different column names. or maybe i am thinking too much
OriginalGriff 3-Mar-17 11:53am    
Maybe you are.
What are you trying to do - rather that thinking about the "mechanics" of a solution, perhaps a new set of eyes on the problem might help?
JT1992 3-Mar-17 11:56am    
okay i am trying to read an excel spreadsheet, then create an access table with the same data. so basically read excel and write to access database table. each excel will have different column names and i would never know the exact name. however, i have to create a table each time i read a new excel spreadsheet. and hey thank you so much for the help. really appreciate.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900