I prepare the data using a report (with the appropriate WhereCondition), which I can then export either as a PDF or Excel.xls. I just had to change the acFormat (acFormatPDF or acFormatXLS). In the Excel file the fonts are displayed quite gray. Is there an explanation for this?
Sub
DoCmd.OpenReport strReport, acViewPreview, , strWhere, acHidden, strBez
'Ausgabe PDF
DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, strDatei
'Ausgabe Excel xls
DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, strDatei
End Sub
I have now switched the sub to export with TransferSpreadsheet.
Sub
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, qryDatei, "C:\test.xlsx", True
End Sub
With this I can create an xlsx Excel file that is displayed perfectly with headings, but a "Report" and a "Where condition" are not possible.
What options do I have?
Thanks for your help!
Sub
DoCmd.OpenReport strReport, acViewPreview, , strWhere, acHidden, strBez
'Ausgabe PDF
DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, strDatei
'Ausgabe Excel xls
DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, strDatei
End Sub
I have now switched the sub to export with TransferSpreadsheet.
Sub
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, qryDatei, "C:\test.xlsx", True
End Sub
With this I can create an xlsx Excel file that is displayed perfectly with headings, but a "Report" and a "Where condition" are not possible.
What options do I have?
Thanks for your help!