Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Prajeesh Nair
  Where is Prajeesh Nair?
 Chennai
 India
 Prajeesh Nair
 Tags
Subject: RE: Export to Excel
Thread ID: 189131 Message ID: 189137 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Wednesday, August 13, 2008 2:10:26 PM         
   


> Dear All
>
> I have table call customer.dbf which contains more than 2,00,00 recoreds. while tring to convert this table to Excel first 65,000 record only getting copied to Excel
>
> Copy to employee.xls type XLS
>
> Can you help me to convert all record into excel format.
>
> Can i convert to this into different pages of same work book?
>
> Is any example(code) available for this?
>
> Prajeesh

The reason is that the first version of Excel that can create more than 65000 rows id Excel 2007 aka excel 12. You would have to split your data over several worksheets, or use Excel 2007.

The problems have been discussed often on Foxite and you can locate the threads using Search on the Home page.

There are a number of ways to bring data over to Excel. Here's an example where Excel reads the table using VFPOLEDB.DLL

*****
LOCAL oExcel AS Excel.APPLICATION
LOCAL oBook AS Excel.Workbook
LOCAL oSheet AS OBJECT
oExcel = CREATEOBJECT("Excel.Application")
oBook = oExcel.Workbooks.ADD
oSheet = oBook.Worksheets(1)

* 'Create the QueryTable object.
LOCAL oQryTable AS OBJECT, strData AS STRING
strData = [C:\Projekt\Testing]
oQryTable = oSheet.QueryTables.ADD ;
("OLEDB;Provider=VFPOLEDB.1;Data Source="+strData+";", ;
oSheet.RANGE("A1"),"Select * from MemoToExcel")
oQryTable.RefreshStyle = 2 && xlInsertEntireRows = 2
oQryTable.REFRESH(.F.)
oExcel.VISIBLE=.T
******

-Anders

ENTIRE THREAD

Export to Excel Posted by Prajeesh Nair @ 8/13/2008 1:51:33 PM
RE: Export to Excel Posted by Anders Altberg @ 8/13/2008 2:10:26 PM
RE: Export to Excel Posted by David Kurniawan @ 8/13/2008 2:24:54 PM
RE: Export to Excel Posted by Anders Altberg @ 8/13/2008 2:34:08 PM
RE: Export to Excel Posted by Anders Altberg @ 8/13/2008 2:15:35 PM
RE: Export to Excel Posted by Yousfi Benameur @ 8/14/2008 1:28:29 AM
RE: Export to Excel Posted by Debra McNeill @ 10/29/2008 9:56:45 PM
RE: Export to Excel Posted by Yousfi Benameur @ 10/30/2008 1:31:19 AM
RE: Export to Excel Posted by Anders Altberg @ 10/30/2008 9:01:34 AM