I want to export my database tables to an Excel 2007 spreadsheet using servlets. Can anybody help me on this? I use Postgres SQL as back end.
You may be looking for an API to write MS Office files. Since you note servlets, I assume you are coding in Java.
Related
I got a connection to the SAP HANA database. I've created a personal DB called simply "database" which I want to fill with two CSV files that I have in my laptop.
How can I do this?
Do I need to create the tables with the all the columns before?
One of the problem is that my CSV files are composed by 130 columns.
It is impossible to create all the columns from scratch.
Thank you in advance for you help.
You can simply use the import data from front end function in SAP HANA Studio for that.
The wizard lets you define the target table structure based on the data found in the CSV files.
Check this out Import CSV into SAP HANA, express edition using the SAP HANA Tools for Eclipse
Is it possible to run multiple PostgreSQL queries, and using pgadmin3 have them each export to a separate tab on a XLSX file?
On those same lines, is it possible to run one PostgresQL query that exports to multiple tabs based on some criteria?
You'll want to use an external tool for this. PostgreSQL knows nothing about the XLSX format, nor about OpenDocument or any of that.
I suggest writing a script that exports a bunch of individual CSV files with copy. Then using an external tool to convert them to xlsx and assemble them into sheets in the document.
It's possible that ETL tools like CloverETL, Pentaho Kettle, or Talend Studio may do what you want too. I haven't checked this specific functionality.
I need to send a couple of tables from our Oracle database to one of our developers.
I usually just send the entire database. But how to send only selected tables?
You can use the Export tool from oracle.
exp scott/tiger file=emp.dmp tables=(emp,dept)
Here is a link to the FAQ from oracle.
I would like to import an Excel .xls file workbook into Powerbuilder. The file has 2 sheets and these sheets must be imported into 2 differenct db tables.
Any assistance is kindly appreciated.
Thanks
John.
First thing, there's nothing automagic, along the lines of a one-line solution that you could get for other file formats. There's a manual method, there's a scripting approach, and you can probably merge the two as a third option.
For a manual method, you can go into Excel and export your data as something that will import into a DataWindow. You don't mention your PowerBuilder version, but the file format for importing from Excel that comes to mind is CSV, which was added in PB9.
For a scripting approach, you can use OLE (assuming Excel is installed on the client machine) and access data however you want with the scripting engine, moving it into PowerBuilder in whatever format you want.
To mix the methods, you could use OLE to export the file to a couple of CSVs, then dw.FileImport() the data in.
Good luck,
Terry.
Postscript: Sybase has examples of OLE access, and examples of using ODBC, a solution I had neglected before.
If you give names to the areas with the data in Excel and then setup ODBC connections that point to them, you can access them like a database table from within PowerBuilder.
i am using ADO.Net oledb for inserting and fetching data from Excel database. I want to make first column in the excel sheet to bold and i want to add comments. I am achieving this thru Interop.Excel Application class.
i dont want to use interop. is there anyway to achieve through ADO.net query itself ? or some other way? My application is c# windows application
No way through ADO.NET, any more than there is of making a SQL Server column bold. ADO.NET treats Excel as a data source - formatting is something quite different and requires knowledge of the Excel spreadsheet format, such as you'd get via Interop. There are probably other libraries you can use if you search...