Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Now, save that xml as a html in my web_page directory...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01056887
Message ID:
01057931
Views:
28
Edgar,
I will try this code in home and let you know what happened.
(If in this message below is whole your code)

>Thank you Cetin and Borislav,
>
>I can see that Cetin's code is functional, but for my already derived charts the .Publish only errors out.
>
>I may need to reestablish my intensions; the publish may be expecting some completed portion web page that I have not developed yet.
>
>I have successfully automated a master-sheet update from SAP that feeds the linked Charts.
>This is my first attempt at corporate web development, so, I am understandably confused...
>
>All that I need is to provide a final web page that will allow the end user to select from a 'button menu' business sector providing a list of the appropriate 'completed' charts for that department, where a buttons-for-xl-chart will open the created web-page of that chart.
>I have not developed the big-button forms yet, I do have the excel charts saving as xml. Presentation (touch-screen and web) is everything. Currently we have 52 total spreadsheet-charts - but it would be nice for the end user to be able to interact with charts to change display for specific time frames (would be a bonus). Chart 'Growth', number and variation, is inevitable.
>
>What I thought would be the easiest part of the life cycle - is turning out to be the most challenging.
>
>
>>>Any other ideas?
>>>
>>>      FOR ifw= 1 to nWSF
>>>         With oExcel
>>>            .DisplayAlerts= .F.
>>>            IF wanted
>>>               .WorkBooks.Open(laFileListWS [ifw,1],1)
>>>               .Visible= .F.
>>>               FOR itabor = 1 to .ActiveWorkBook.WorkSheets.Count && creating list xl
>>>                  iDime= iDime+.ActiveWorkBook.WorkSheets.Count
>>>                  DIMENSION aTheDMDxls(iDime)
>>>                  iArrayElement= iArrayElement+ 1
>>>                  aTheDMDxls(iArrayElement)= laFileListWS [ifw,1]+"\"+ALLTRIM(.ActiveWorkBook.ActiveSheet.Name)
>>>                  StandardLbl= "StandardLabel"+ALLTRIM(STR(iArrayElement))
>>>                  IF iArrayElement < 55 && Limit to 54 worksheet selections
>>>                     _screen.ActiveForm.&StandardLbl..Caption= IIF(iArrayElement<10, ;
>>>                                                               " "+ALLTRIM(STR(iArrayElement))+ " ", ;
>>>                                                               PADR(ALLTRIM(STR(iArrayElement)),3))+ ;
>>>                                                               aTheDMDxls(iArrayElement)
>>>                     _screen.ActiveForm.&StandardLbl..Visible= .T.
>>>                  ENDIF
>>>                  _screen.ActiveForm.Refresh
>>>                  .ActiveWorkBook.WorkSheets(m.iTabor).Activate
>>>                  .range("A3").select()
>>>                  .ActiveWorkbook.PublishObjects.Add(xlSourceSheet, "C:\Some1.htm", .ActiveWorkBook.ActiveSheet.Name, ;
>>>                                                     "", xlHtmlStatic, "Book1_12385", _screen.ActiveForm.&StandardLbl..Caption)
>>>                  .Publish (.t.)
>>>                  .AutoRepublish = .f.
>>>               ENDFOR
>>>            ENDIF
>>>         EndWith
>>>      ENDFOR
>>>   _screen.ActiveForm.Caption= "Excel Chart List"
>>>   READ events
>>>   oExcel.Quit
>>>   Release oExcel
>>>
>
>>Edgar,
>>PMFJI, Publish is a method of PublishObjects. ie:
>>
>>.ActiveWorkbook.PublishObjects.Add( ... ).Publish(.t.)
>>
>>or:
>>
with .ActiveWorkbook.PublishObjects.Add( ... )
>> .Publish(.t.)
>> .AutoRepublish=.f. && Default .f. - no need for this one
>>endwith
>>
>>
>>ie:
>>
>>* Part of xlChartType constants
>>#Define xl3DArea 					-4098
>>#Define xl3DColumn					-4100
>>#Define xl3DLine					-4101
>>#Define xl3DPie						-4102
>>#Define xlArea						1
>>#Define xlBubble3DEffect			87
>>#Define xlLine						4
>>#Define xlPie						5
>>#Define xlRadar						-4151
>>#Define xlSurface					83
>>
>>*** set the LOCALEID to English
>>nlLocaleId=sys(3004)		&& Save local id
>>=sys(3006,1033)				&& We will be sending instructions in English
>>ox = crea('excel.application')
>>ox.workbooks.add()
>>With ox.activeworkbook.worksheets(1)
>>  .Cells(1,1).Value = "Product"
>>  .Cells(1,2).Value = "AMount"
>>  .Cells(1,3).value = "Quota"
>>  .Cells(2,1).Value = "Prod1"
>>  .Cells(2,2).Value = 12000
>>  .Cells(2,3).value = 11000
>>  .Cells(3,1).Value = "Prod2"
>>  .Cells(3,2).Value = 45000
>>  .Cells(3,3).value = 48000
>>  .Cells(4,1).Value = "Prod3"
>>  .Cells(4,2).Value = 37000
>>  .Cells(4,3).value = 38000
>>  oChart = .ChartObjects.Add(0, 0, 500, 200)
>>  oChart.Chart.chartwizard(.range(.Cells(1,1),.Cells(4,3)),xl3DColumn,4,1,0,1,1,"","","","")
>>Endwith
>>With oChart.Chart
>>  .hastitle = .t.
>>  .haslegend = .t.
>>  .ChartTitle.caption = "This is chart title"
>>  .plotby = 2
>>
>>  #Define xlCategory		1
>>  #Define xlValue			2
>>  #Define xlSeriesAxis	3
>>  With .Axes(xlValue)
>>    .hastitle = .T.
>>    With .AxisTitle
>>      .Caption = "This is Rotated Value title"
>>      .Font.Size = 10
>>      .Font.Bold = .f.
>>      .Orientation = 90 && Show 90 degrees rotated - clockwise
>>    Endwith
>>  Endwith
>>  #Define xlSourceChart 5
>>  #Define xlHTMLStatic 0
>>  #Define xlHTMLChart 3
>>  ox.activeworkbook.PublishObjects.Add(xlSourceChart, "C:\temp\myXLExportSample.htm", ;
>>    ox.activeworkbook.worksheets(1).name,.Parent.Name, ;
>>    xlHTMLStatic, "", "Published From Excel").Publish(.t.)
>>Endwith
>>ox.activeworkbook.saved = .t. && Suppress save dialog
>>ox.quit      && Quit excel
>>=sys(3006,val(nlLocaleId))
>>
Cetin
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform