473,395 Members | 1,484 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,395 software developers and data experts.

To write data into excel file from access

atksamy
91
HI,

I am currently using this code to write data in to a word file, How can i modify this to write data into a excel file column wise and save it as csv file?

Expand|Select|Wrap|Line Numbers
  1.      Dim objWord As Word.Application
  2.                      Dim docWord As Word.Document
  3.                      Dim docExists As Boolean
  4.                      Set objWord = CreateObject("Word.Application")
  5.                      objWord.Visible = True
  6.                      On Error GoTo OpenDoc
  7.                      docExists = False
  8.                      Set docWord = objWord.Documents.Open("C:\REPORT1.doc")
  9.                      docExists = True
  10. OpenDoc:
  11.  
  12.                      On Error GoTo 0
  13.                      If Not docExists Then
  14.                      Set docWord = objWord.Documents.Add
  15.                      End If
  16.  
  17.  
  18. docWord.Content.InsertAfter "xxxxxxxxxx"
  19.  
  20.  
  21. objWord.Visible = True
  22.   docWord.Content.InsertParagraphAfter
  23.   docWord.SaveAs ("C:\REPORT1.doc")
Nov 11 '08 #1
1 1479
you may want to browse the answer of one member here.... i'm also looking on ways to write data from access to excel...

http://bytes.com/forum/thread852979.html
Nov 11 '08 #2

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

Similar topics

2
by: Niyazi | last post by:
Hi, I have to retrieve a data from AS400 DB2 and after working with data I have to export into one of existing Excel file. I can connect into specific library in AS400 DB2 using AS400...
0
by: Zed | last post by:
I have a problem with .net writing to a remote server that I need to deploy on. The app works fine on my local machine. But when got access to the server I went to VS.NET and tried to create a...
7
by: Jenni | last post by:
Hi again, What I need to do is get an entire table from access into excel. It would have to over-write the existing data on the spreadsheet, and it should not run unless it is asked to. (this is...
8
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept...
0
by: Jack | last post by:
Windows 2K Pro Access/Excel 2003 Hi there, I have a large number of password protected Excel Workbooks. The files are protected by code that runs when the workbook opens. The code asks the...
11
by: Hi5 | last post by:
Hi, I am new to access I usedto work in Oracle and Mysql. I am after a way that enables me to populate a database I designed in access with lots of data which can be sorted in excel sheets, ...
1
by: veens-zevenhonderdvijf | last post by:
Hi, I want to show an excel-graphs in one of my access-forms. The problem is how to refer to an embedded excel-file in my form. I can refer to an external excelfile (see below) an do some test...
7
by: DanZaMan | last post by:
Just a query about how clever access is, I'm using access 97. When using a "split" database with a separate front-end and with the data file on a separate server on the network how does access...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
8
blazedaces
by: blazedaces | last post by:
So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
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...
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...

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.