heil. m�chte zuerst danken.
ein diagramm �ber excel habe ich schon versucht.
aber es bringt eine fehlermeldung.
Microsoft Excel- Fehler '800a03ec'

Microsoft Excel kann auf die Datei 'C:\inetpub\wwwroot' nicht zugreifen. 
Dies kann mehrere Gr�nde haben: • Der Name des Dokumentes oder der 
Pfad existieren nicht. • Das Dokument, das ge�ffnet werden soll, wird 
von einem anderen Benutzer oder Programm verwendet. Schlie�en Sie das 
Dokument in dem anderen Programm und versuchen Sie es erneut. • Der 
Name der Arbeitsmappe, die gespeichert werden soll, ist identisch zu dem 
Namen eines anderen Dokumentes, welches schreibgesch�tzt ist. Versuchen Sie 
die Arbeitsmappe unter einem anderen Namen zu speichern.

/GenXlsChart.asp, line 97

zeile 97 ist:

xlSheet.SaveAs Server.MapPath(strFileName)

habe alles nachkontrolliert. habe auch pfad richtig. geht trotzdem nicht. an 
was k�nnte es blo� liegen.

ich schick mal den ganzen code:

<% @ Language="VBScript" %>
<%
Response.Buffer=True
Response.Clear

Dim xlApp,xlBook,xlSheet,objConn,objRS,iRow
Dim objFileCache,bXlsFile,strFileName

iRow = 4
strFileName = "MyChart.xls"

Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
strConn = strConn & Server.MapPath("Sales00.mdb")
strQuery = "SELECT ProductName,ProductIncome FROM ProductSales"
objConn.Open strConn
objRS.Open strQuery, objConn


If Not objRS.EOF and Not objRS.BOF Then
  arrData = objRS.GetRows()
Else
  bNoRecords = True
End If


objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing

'-------------------------------- END of DATA 
Acquisition---------------------

'-------------------------------- BEGIN XLS Generation 
-----------------------

strFileName = "MyChart.xls"
Set xlApp = Server.CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets(1)

xlApp.Application.Visible = False

xlBook.Sheets.Add
xlBook.ActiveSheet.Name = "Data"

With xlBook.Sheets("Data").Cells(1,1)
        .Value = "Overall Product Sales 2000"
        .Font.Bold = True
        .Font.Name = "Tahoma"
        .Font.Size = 16
End With

With xlBook.Sheets("Data").Cells(3,1)
        .Value = "Product Name"
        .Font.Italic = True
        .Font.Name = "Tahoma"
        .Font.Size = 13
        .MergeCells = True
End With

With xlBook.Sheets("Data").Cells(3,2)
        .Value = "Product Income"
        .Font.Italic = True
        .Font.Name = "Tahoma"
        .Font.Size = 13
        .MergeCells = True
End With

For i = 0 To Ubound(arrData,2)
        xlBook.Sheets("Data").Cells(iRow+i,1).Value = arrData(0,i)
        xlBook.Sheets("Data").Cells(iRow+i,2).Value = arrData(1,i)
    xlBook.Sheets("Data").Cells(iRow+i,2).NumberFormat = "$#,##0.00"
Next

'--- Creating Chart
xlBook.Charts.Add
xlBook.ActiveChart.Name = "BarGraph"
xlBook.Charts("BarGraph").SetSourceData 
(xlBook.Sheets("Data").Range("A4:B9"))

'--- 3DPieExploded
'xlBook.Charts("BarGraph").ChartType = 70
'xlBook.Charts("BarGraph").PlotBy = 2

'--- 3DColumns
xlBook.Charts("BarGraph").ChartType = 54
xlBook.Charts("BarGraph").PlotBy = 1
xlBook.Charts("BarGraph").HasAxis(1) = 0

Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(Server.MapPath(strFileName))) Then
   Set MyFile = fso.GetFile(Server.MapPath(strFileName))
   MyFile.Delete
End If

xlSheet.SaveAs Server.MapPath(strFileName)


xlApp.Application.Quit

Set xlSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing

Set objFileCache = Server.CreateObject("Softwing.FileCache.1")
bXlsFile = objFileCache.InitFromFile(strFileName, False)
objFileCache.MimeType = "application/octet-stream"
bXlsFile = objFileCache.Write()

Response.End
%>




_________________________________________________________________
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp


| Oft Gefragtes: http://www.aspgerman.com/aspgerman/faq/
| [aspdebeginners] als [email protected] subscribed
| http://www.aspgerman.com/archiv/aspdebeginners/ = Listenarchiv
| Sie knnen sich unter folgender URL an- und abmelden:
| http://www.aspgerman.com/aspgerman/listen/anmelden/aspdebeginners.asp

Antwort per Email an