hi all,
kindly suggest me how to import .csv files into excel by using VB 6.0 SOFTWARE.Kindly help me asap.
Regards
Anup
8 10957
hi all,
kindly suggest me how to import .csv files into excel by using VB 6.0 SOFTWARE.Kindly help me asap.
Regards
Anup
Hi all,
Plzzzzzzzzzzzzzz help its very important and urgent..I tried the same by runing a macro and it had worked....But i cant figure out the same in vb6.0
hi all,
kindly suggest me how to import .csv files into excel by using VB 6.0 SOFTWARE.Kindly help me asap.
Regards
Anup
I don't have VB6 here, so this is pretty much from memory.
First set a reference to Microsoft Excel Object Library - Option Explicit
-
Sub BtnExcel_Click()
-
Dim xlApp As New Excel.Application
-
Dim xlBook As Excel.Workbook
-
Set xlBook = xlApp.Workbooks.Open("C:\Documents and Settings\Sam\My Documents\IncomeSurvey.csv")
-
xlApp.Visible = True
-
End Sub
HTH --Sam
I don't have VB6 here, so this is pretty much from memory.
First set a reference to Microsoft Excel Object Library - Option Explicit
-
Sub BtnExcel_Click()
-
Dim xlApp As New Excel.Application
-
Dim xlBook As Excel.Workbook
-
Set xlBook = xlApp.Workbooks.Open("C:\Documents and Settings\Sam\My Documents\IncomeSurvey.csv")
-
xlApp.Visible = True
-
End Sub
HTH --Sam
Hi Sam.,
Above thing works when i do it in excel.....But it doesnot work when i do same thing in Vb6.
Hi Sam.,
Above thing works when i do it in excel.....But it doesnot work when i do same thing in Vb6.
What fails? Did you add a reference to Microsoft Excel Objects?
What fails? Did you add a reference to Microsoft Excel Objects?
ya sam its working now.....I didnot add a reference in earlier occasion....Thanx for your support.
But there is one more problem now.When I ran this query it gives me entire detials in a single sales...
I want to imported these data by delimiting semilcon.So, that i can be able to see the contents in various columns.
Plz help
I'm not sure I followed that, but if you mean that your file is semicolon deliminated instead of comma deliminated, then you just need to parse the data after opening: - Option Explicit
-
Sub BtnExcel_Click()
-
Dim xlApp As New Excel.Application
-
Dim xlBook As Excel.Workbook
-
Set xlBook = xlApp.Workbooks.Open("C:\Documents and Settings\Sam\My Documents\IncomeSurvey.csv")
-
xlApp.Visible = True
-
xlBook.ActiveSheet.Columns(1).TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
-
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
-
Semicolon:=True, Comma:=False, Space:=False, Other:=False
-
End Sub
I'm not sure I followed that, but if you mean that your file is semicolon deliminated instead of comma deliminated, then you just need to parse the data after opening: - Option Explicit
-
Sub BtnExcel_Click()
-
Dim xlApp As New Excel.Application
-
Dim xlBook As Excel.Workbook
-
Set xlBook = xlApp.Workbooks.Open("C:\Documents and Settings\Sam\My Documents\IncomeSurvey.csv")
-
xlApp.Visible = True
-
xlBook.ActiveSheet.Columns(1).TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
-
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
-
Semicolon:=True, Comma:=False, Space:=False, Other:=False
-
End Sub
hey there! Could you please help me out... I'm trying to open a database of access to an excel document through visual basic 6.0 any ideas? thanks a lot
Hi All,
I want to import A tsv file to a existing excel sheet instead of a new sheet. Kindly Help.
Thanks
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Grim Reaper |
last post by:
I am importing a .csv file into Access that has 37 fields. My problem is
that sometimes the last field only has data at the end of the column (it
looks like when you import a file into Access, for...
|
by: Geoff Jones |
last post by:
Hi
I have a question which I hope somebody can answer. I have written a VB
application with which I want to import an Excel file, analyze the data
within it and do some calculations. There are...
|
by: Snozz |
last post by:
The short of it:
If you needed to import a CSV file of a certain structure on a regular
basis(say 32 csv files, each to one a table in 32 databases), what
would be your first instinct on how to...
|
by: hharriel |
last post by:
Hi,
I am hoping someone can help me with an issue I am having with excel
and ms access. I have collected data (which are in individual excel
files) from 49 different school districts. All...
|
by: mukeshsrivastav |
last post by:
dear sir
i want to move form excel to access.
i have 5 excel file having same formats and fields.now i want to import all data in one access table.
importing one file is easy .but importing and...
|
by: 14276674 |
last post by:
I wrote a program in C that implemens a database. Now I want to
upgrade the program so the user can import an excel worksheet and not
have to fill in the entire database. How do you import data...
|
by: kkadakia |
last post by:
I get a daily excel file for a entire month which I want to transfer into Access at the end of the month. So, there are around 20-25 excel files I get by the end of the month, and I would like to...
|
by: John Overton |
last post by:
I have a new requirement to Import and Export Excel tables into and out of Access 2003. The Excel tables are located on a remote server but I know the path to the Excel Files.
Can you please help...
|
by: thadson |
last post by:
Hi,
I'm trying to import specific cells from MS Excel 2000 spreadsheets to MS Access 2000 tables then move the spreadsheets to a different directory.
I'm very new to this and I'm having trouble...
|
by: scoots987 |
last post by:
What do others do if you need to import excel files into SQL Server?
My main problems are
1) zipcode formatting issues. If the column is a mix of zip and zip+4,
I have problems retrieving all...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |