473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Saving data from visual basic 6 to an excel file

Hi this is Hema

I took a journey on learning Visual Basic 6

I want to save data in a visual basic form to an Excel file in a neat and tabulated format

Ex : I have two text boxes which gives the details about the user such as

Text Box 1 : Name
Text Box 2 : Job Designation

I can move the data to a normal Text file using "Open, Write, Close" file commands

But in case of Excel file,i dont get any idea

When i searched in forums, i can get the codes for my problem

But i dont feel comfortable because i cant understand the code in-depth

So please can anyone suggest me some good books or tutorials or websites to learn the concept of "Saving the data from visual basic form to an Excel file"

I feel much helpfull if i get a solution
Thank you
Apr 3 '12 #1
4 1674
Killer42
8,435 Expert 8TB
VB can work directly with Excel files, in a couple of ways. However, for this sort of output you may find the simplest thing is just to write out a text file as you've tried, but with the data in CSV (Comma Separated Values) format, and with an extension of csv instead of txt.

CSV format is quite simple to write, as well. You simply put commas between the fields. If a field contains either commas or quotes (") you put quotes around it, and double the quotes within the data. For example a field with the admittedly rather odd value of
abc,d"efg
would become
"abc,d""efg"

Any time you're not sure about exactly how to write something to a CSV file, I recommend you just put that value in a spreadsheet in Excel, then use Save As and select CSV format. That way Excel itself can show you how it wants the data formatted.
Apr 4 '12 #2
Thank u sooooo much
i tried it

ya it is successfull

i can move the data from visual basic to an excel file

but i have lot many doubts regarding this

At present, I have the following doubts

If i have many datas with me like Name, Designation, Age, etc.., I need to move all the datas in a tabulated way to an excel file

I need the data to be placed in a specified cell of an Excel file

I may rising so many doubts regarding this
So I feel better if i get any good books to learn how to make things possible

Please suggest me some good books or tutorials or websites to learn
"Detailed study about moving data from a visual basic form to an Excel file"

Thank You so much for your kind answers
Apr 7 '12 #3
Killer42
8,435 Expert 8TB
I don't know of any. What I'd suggest for this is to hit Google with the key words of your query. It should find you plenty of tutorials and the like.
Apr 22 '12 #4
I gained much in google
Thank u
Apr 22 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Eduardo | last post by:
Hi I would like to develop an application in Visual Basic (both in VB.6 and VB.NET) from where I could extract the data contained in a spreadsheet (excel) to a Database in Access 2000. Has...
1
by: Steve | last post by:
I am trying many ways to create and save data to an Excel file, but all I got is the following error message. (The code behind is in C#.net) System.UnauthorizedAccessException Here is my...
1
by: lingammca | last post by:
Hi, I am working in a web application where I need to import data from one Excel file. Add a row number to each row in that file and save it in the specified folder. All this have to be done by...
0
by: MKH | last post by:
Greetings, OS = Windows 2000 Server SP4 SQL = MS SQL 2000 Server SP4 Language = T-SQL I have an excel file stored in a data base table as an image data type. I would like to somehow...
0
by: napstar | last post by:
I have an excel file with data.I want to pull data from the excel file into a table in access.The data in excel has products and customers who buy these products and sometimes 1 customer can buy many...
1
by: hanhan | last post by:
Hi all, I need to write a program in VB.Net 2003 for the pocket PC (with mobile 5), which will read data from an Excel file, and dispay them. I didn't succeed to create a correct connection to...
1
by: kanmbk | last post by:
Hi, I supposed to upload the data of an excel file in to database. I dont know how to do this. Please help me. Bharathi..
2
by: mangalamonkey | last post by:
I want to export data into an excel file using iReports.I could do that but the data is displayed as an image. I need the data to be displayed as cells as in the excel sheet. plz do reply.........
6
by: slinky | last post by:
I found the following code to transfer datagrid data to an Excel file. Is this written in C#?... I'm a vb.netter. I'm just not sure where to place the code to experiment on it. Should I place it in...
1
by: JFKJr | last post by:
Hi! I have exported an access table data into an excel file using the following code. However, the code exported all the data to the excel sheet starting from 'A' cell (first column). But I want to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
Oralloy
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,...
0
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.