Jump to content

Search the Community

Showing results for tags 'excel'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 13 results

  1. Hi, Currently any colour changes in the grid are not reflected on the export. I need to be able to persist either cell colour or text colour when exporting from a grid to make cells visually clear. Like the image below: I can get the cells to change to the respective colour on the grid within the application, what I'm looking for is a way to persist these cell colours when exporting. I am currently using the UniGridExcelExporter component calling grid.Exporter.ExportGrid; to export. Any help would be great. Regards, Wicket
  2. To all tortured soles that have to fulfill the Excel dependent customer demands, I found this on the net. To my amazement , it works ! http://blog.runbits.com/post/Native-Export-XLS-without-excel-Delphi.aspx Have fun !
  3. Hi, As the title says, I converted a library that Mike Heydon made to export a DataSet to old format Excel file (xls) without OLE or Excel installed. This library now converts an UniDBGrid to Excel. Sample of usage. // Add uses UExportExcel procedure TMainForm.UniButton1Click(Sender: TObject); var url, filename, reportname : String; exportExcel: TDataSetToExcel; i: integer; begin reportname := 'ExcelReport'; url := UniServerModule.LocalCacheURL+name+'.xls'; filename := UniServerModule.NewCacheFileUrl(false, 'xls', reportname, '', url); exportExcel := TDataSetToExcel.Create(filename); exportExcel.Grid := UniDBGrid1; exportExcel.WriteFile; FreeAndNil(exportExcel); UniSession.SendFile(filename, reportname+'.xls'); end; Hope it helps everyone. UExportExcel.zip
  4. Hello friends I would like information if there is any way to export information in a query, grid or dataset to excel in unigui. I have a report generation screen that is viewed in Fast Report and the client wants to export to excel, but the native delphi options that work with error unit COMobj. If someone has an example I thank you very much Hello friends I would like information if there is any way to export information in a query, grid or dataset to excel in unigui. I have a report generation screen that is viewed in Fast Report and the client wants to export to excel, but the native delphi options that work with error unit COMobj. If someone has an example I thank you very much
  5. Hello, I have a question within my application that needs at some point I need to import information from an excel spreadsheet into the application. In desktop applications I use options that use COMobj and use the following code: Procedure ... Var excelSheet, Excel: Variant; Begin Excel: = CreateOleObject ('Excel.Application'); Excel.Visible: = false; Excel.WorkBooks.Open (FileSource.Text); ExcelSheet: = excel.Workbooks [1] .WorkSheets [1]; DData: = Excel.WorkBooks [1] .Sheets [1] .Cells [1,1]; End; When I use this function in uniGui it's message: CoInitialize was not called, ProgID: "Excel.Application". Could anyone help with this? Best regards Anderson Brazil
  6. Buen dia, Necesito saber si es posible exportar datos a un excel para luego mostrarlo a un usuario, y que me recomiendan para hacerlo. Gracias,
  7. why i cant create excel file, this is the error i use fast report, here is my code procedure TRptModule.MyFrxexcel(frxReport: TfrxReport); begin frxReport.ShowProgress:=False; frxReport.PrintOptions.ShowDialog:=False; frxReport.EngineOptions.SilentMode:=True; frxXLSXExport1.SlaveExport:=False; frxXLSXExport1.SuppressPageHeadersFooters:=False; frxXLSXExport1.Wysiwyg:=True; frxXLSXExport1.FileName := UniServerModule.LocalCachePath +RptName; frxXLSXExport1.DefaultPath := ''; frxReport.PrepareReport(); frxReport.Export(frxXLSXExport1); // Export Report UniSession.SendFile(UniServerModule.LocalCachePath +RptName, RptName); end; Regards yudi
  8. uses JvDBGridExport, DBGrids; // Activex; for Word/Excel var mygrid : TDBGrid; myexport : TJvDBGridCSVExport; // myexport : TJvDBGridExcelExport; // myexport : TJvDBGridWordExport; // myexport : TJvDBGridHTMLExport; begin mygrid := TDBGrid.Create(nil); mygrid.DataSource := unimainmodule.myexportdatasource; // CoInitialize(nil); // call only if export to Word/Excel myexport := TJvDBGridCSVExport.Create(nil); // myexport := TJvDBGridExcelExport.Create(nil); // myexport := TJvDBGridWordExport.Create(nil); // myexport := TJvDBGridHTMLExport.Create(nil); myexport.FileName := 'c:\myexport.csv'; myexport.ExportSeparator := esSemiColon; // estab, esComma, esSemiColon myexport.Grid := mygrid; myexport.ExportGrid; // read exceptions in: myexport.LastExceptionMessage; myexport.Free; mygrid.Free; end; If you want to export to Word/Excel, then you have to have Office installed on the Server. Excel can easily read CSV files. You need to have JVCL in your Delphi.
  9. Hi Farshad! Can you include "SpreadSheet" in the framework??! http://www.extjs4spreadsheet.com/spread/10/examples/spread-full http://www.extjs4spreadsheet.com/en/introduction Thank you! Sincerely.
  10. Hi, I am using the following code to export data to excel. But this code is working in vcl and standalone server mode, does not work in isapi mode. I need the code to work in ISAPI mode. Do you have any idea for help me ? var Excel, wSheet: Variant; i,j:integer; s,Fl:string; Begin If Myq_Report.RecordCount>0 Then Begin try Excel:= CreateOleObject('Excel.Application'); except Exit; end; Excel.Visible := False; Excel.Workbooks.Add; wSheet:= Excel.WorkBooks[1].WorkSheets[1]; wSheet.Cells[2,1] := 'Company'; wSheet.Cells[2,1].Columns.ColumnWidth:=20; wSheet.Cells[2,2] := 'Date'; wSheet.Cells[2,2].Columns.ColumnWidth:=10; wSheet.Cells[2,3] := 'Time'; wSheet.Cells[2,3].Columns.ColumnWidth:=5; wSheet.Cells[1,1]:='SERVICE LIST'; wSheet.Rows[1].RowHeight := 20; wSheet.Rows[1].Font.Size := 14; wSheet.Rows[1].Font.Color:=ClWhite; wSheet.Range['A1:R1'].Mergecells:=True; wSheet.Range['A1:R1'].Interior.ColorIndex:=16; wSheet.Range['A1:R1'].HorizontalAlignment := -4108; wSheet.Range['A1:R1'].VerticalAlignment := -4108; Fl:='servicelist_'+FormatDateTime('YYMMDDhhmmnnss',now)+'.xls'; wSheet.SaveAs(UniServerModule.LocalCachePath+Fl); s := UniServerModule.LocalCacheURL; s := StringReplace(s,'\','/',[rfReplaceAll]); UniURLFrame1.URL := s+fl; Excel.quit; End; End;
  11. Hi, I am using the following code to export data to excel. But this code is working in vcl and standalone server mode, does not work in isapi mode. I need the code to work in ISAPI mode. Do you have any idea for help me ? var Excel, wSheet: Variant; i,j:integer; s,Fl:string; Begin If Myq_Report.RecordCount>0 Then Begin try Excel:= CreateOleObject('Excel.Application'); except Exit; end; Excel.Visible := False; Excel.Workbooks.Add; wSheet:= Excel.WorkBooks[1].WorkSheets[1]; wSheet.Cells[2,1] := 'Company'; wSheet.Cells[2,1].Columns.ColumnWidth:=20; wSheet.Cells[2,2] := 'Date'; wSheet.Cells[2,2].Columns.ColumnWidth:=10; wSheet.Cells[2,3] := 'Time'; wSheet.Cells[2,3].Columns.ColumnWidth:=5; wSheet.Cells[1,1]:='SERVICE LIST'; wSheet.Rows[1].RowHeight := 20; wSheet.Rows[1].Font.Size := 14; wSheet.Rows[1].Font.Color:=ClWhite; wSheet.Range['A1:R1'].Mergecells:=True; wSheet.Range['A1:R1'].Interior.ColorIndex:=16; wSheet.Range['A1:R1'].HorizontalAlignment := -4108; wSheet.Range['A1:R1'].VerticalAlignment := -4108; Fl:='servicelist_'+FormatDateTime('YYMMDDhhmmnnss',now)+'.xls'; wSheet.SaveAs(UniServerModule.LocalCachePath+Fl); s := UniServerModule.LocalCacheURL; s := StringReplace(s,'\','/',[rfReplaceAll]); UniURLFrame1.URL := s+fl; Excel.quit; End; End;
  12. Please Farshad! Give the solution ... Thank you!
  13. Hi; I was successfully to export and download a datasource content using ZEXMLSS Download XML file and open with excel it works very nice for me. Used Component : ZEXMLSS and ZColorStringGrid from http://avemey.com/index.php?lang=en Turbo power tpabbrevia from http://sourceforge.net/projects/tpabbrevia/?source=dlp You must install a zip component and zcolorstring for exporting. I need some modification ZEXMLSS compatiblity for tpabbrevia manually during installation. Here is sample code which was tested via XE2 PS : sorry for big capital. I am always using big capital writting a program. // Tdosyaver is uniform formname // RAPORHAZIRLA(XFILENAME:STRING); // Prepare data and export it using ZEXMLSS. QLIST is a datasource and opened before this proc. PROCEDURE TDOSYAVER.RAPORHAZIRLA(XFILENAME:STRING); //uses zexmlss, zeodfs, zexmlssutils, zeformula, zsspxml, zexlsx; var XMLSS: TZEXMLSS; i, j: integer; TextConverter: TAnsiToCPConverter; sEOL: string; XSAYI : INTEGER; XSATIR : INTEGER; XCOL : INTEGER; begin TextConverter := nil; {$IFNDEF FPC} {$IF CompilerVersion < 20} // < RAD Studio 2009 TextConverter := @AnsiToUtf8; {$IFEND} {$ENDIF} {$IFDEF FPC} sEOL := LineEnding; {$ELSE} sEOL := sLineBreak; {$ENDIF} XMLSS := TZEXMLSS.Create(nil); try //There are 1 pages in this document XMLSS.Sheets.Count := 1; XMLSS.Sheets[0].Title := 'Sayfa1'; // EXCEL SHEET NAME //Add styles XMLSS.Styles.Count := 1; XMLSS.Styles[0].Font.Size := 10; XMLSS.Styles[0].Font.Name := 'Arial'; XMLSS.Styles[0].Alignment.Horizontal := ZHCenter; // This parameters are optional and some styles options too (line backcolor, text oriantation etc). XMLSS.Styles[0].Alignment.Vertical := ZVCenter; XMLSS.Styles[0].Alignment.WrapText := true; with XMLSS.Sheets[0] do begin //the count of rows and columns // ZEXMLSS must know how many contain rows and cols. You must set this properties before beginging exporting. RowCount := 50; // ColCount := 20; // All Field Names FOR XSAYI:=0 TO QLIST.FIELDS.COUNT-1 DO BEGIN CELL[XSAYI,1].CellStyle:=1; CELL[XSAYI,1].DATA:=QLIST.FIELDS[XSAYI].FIELDNAME; END; // XSATIR:=2; // row. First row contain field XCOL:=0; // we transfer to all records to ZEXMLSS WHILE NOT QLIST.EOF DO BEGIN FOR XCOL:=0 TO QLIST.FIELDS.COUNT-1 DO BEGIN CELL[XCOL,XSATIR].CellStyle:=1; CELL[XCOL,XSATIR].DATA:=QLIST.FIELDS[XCOL].ASSTRING; END; QLIST.NEXT; INC(XSATIR); END; end; finally FreeAndNil(XMLSS); end; end; procedure TDOSYAVER.BTNEXCELClick(Sender: TObject); VAR XFILENAME : STRING; begin XFILENAME:='Report.XML'; XFILENAME:=UniServerModule.LocalCachePath+XFILENAME; RAPORHAZIRLA(XFILENAME); UniSession.sendFile(XFILENAME); end;
×
×
  • Create New...