|
-
May 23rd, 2006, 04:58 PM
#1
Thread Starter
New Member
VB CODE and Excel Book
Hi all,
I’m a newbie and have no VB experience.
I’m trying to learn how to import multiple complex Excel sheets into existing tables in MS SQL 2000 database.
Is there any book that quickly walks me through VB CODE and Excel?
I know there is not any easy way to do this, but any help or suggestion would be very nice
Bets regards,
Abrahim
-
May 24th, 2006, 03:33 AM
#2
Re: VB CODE and Excel Book
Start small - one small sheet (part of a larger one perhaps!), then work up to the larger ones.
You need to look up automation (in the vba stuff).
In vb, you'd need:
createobject
getobject
To mimic Excel vba you'll also need:
wrk as object 'set to a workbook
sht as object 'set to the sheet you are working from
rng as object 'useful as a range object.
Also, when learning, try using excels record macro function to see how it works. Then copy the code and replace with proper objects (instead of the selection object).
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
May 24th, 2006, 03:36 AM
#3
Re: VB CODE and Excel Book
since your running SSQL Server and want to import Excel to it, you can use DTS (Data Transformation Services) to import/export to and from Excel very easily.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 24th, 2006, 10:15 AM
#4
Thread Starter
New Member
Re: VB CODE and Excel Book
Very helpful info!
I have been using DTS, but the problem is that the Excel work sheet containing data has the column’s format set vertically, for example:
Exam1:
First_name : Jim
Last_name: Smith
Address: San Jose
Exam2:
But in standard format it supposed to be like:
First_name Last_name City
Jim Smith San Jose
I don’t think you can use DTS to import Exam1: format into the Database.
Is there any book for the beginner like me to start with?
Thanks in advance,
Abrahim
-
May 24th, 2006, 11:54 AM
#5
Addicted Member
Re: VB CODE and Excel Book
You can use transpose(copy/pasteSpecial) to obtain your standard format and then import it using DTS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|