Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two problems with DBF to Excel function
Message
From
13/01/2009 12:46:40
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01373048
Message ID:
01373290
Views:
31
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I'm wondering if someone can help me solve two problems. I have this routine Re: Excel Automation Formatting and F9 Thread #1372023 Message #1372036 to produce an Excel from the opened table. I have two problems.
>
>1. If I pass two lines title ('Line1' + CRLF + 'Line2') I only see Line1. I think it's related with my latest modification of the routine to center the title (I use merge columns). I'm not sure how to quickly fix this problem to have both lines centered properly.
>
>2. In Office 2007 there is a prompt to save the file even though I use SaveAs and DisplayAlerts = .f. Is there a way to avoid any dialogs in any version of the office?
>
>Thanks a lot in advance for your help.

Hi Naomi,

1) You are merging cells but still trying to write title lines into different rows (for .. cells(m.lnK) = laTitle[..]). Simply write the title to cells(1,1) . ie:
.Cells(1,1) = m.tcTitle && you may need to remove chrt(13).
2) I don't have 2007 here but this should work:
oExcel.ActiveWorkbook.Close(0)
oExcel.ActiveWorkbook.Saved = .t. && just thi sline should be enough
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform