Export xlsx file through executing scripts in SQL developer - oracle-sqldeveloper

I know that we can use SPOOL command to export query result in CSV format from sql developer. However, I would like to export the query result as xlsx format instead of CSV format. Is there any command that I can use ??

No.
The best you can do is CSV via spool.
Or, if you're going to be exporting tables/views, you can use the sdcli to batch xlsx exports. I show this in detail here

In SQL Developer you can export a gridresult by right-click -> export -> Format = "excel 2003+ ( xlsx ) ... but think you know this already.
Last time I created an XLSX file I used https://technology.amis.nl/wp-content/uploads/2011/02/as_xlsx18.txt
Probably I would use jasper or a different tool now.

Related

Perl parse an .xlsm file without using excel

I have an input .xlsm file from which I have to parse some values.
Currently I am using Win32::OLE which from certain reasons I need to stop using.
Is there a way to parse that file without using EXCEL processes?My searches on google lead me to Spreadsheet::ParseXLSX module and Excel::Writer::XLSX(with some problemes), but I don't know whether they require Excel or not.
Thank you!

Importing data from text file and saving the same in excel

I am trying to read data from text file (which is output given by Tesseract OCR) and save the same in excel file. The problem i am facing here is the text files are in space separated format, and there are multiple files. Now i need to read all the files and save the same in excel sheet.
I am using MATLAB to import and export data. I even thought of using python to convert the files into CSV format so that i can easily import the same in MATLAB and simply excelwrite the same. But no good solution.
Any guidance would be of great help.
thank you
To read a text file in Matlab you can use fscanf or textscan then to export to excel you can use xlswrite that write directly to the excel file.

Create Excel file in iPhone programmatically

I want to create a Excel supported file which contains strings and images programmatically. I tried to create a .csv file, but I am not able to .csv file with both string and image.
There are many possibilities. The easiest way is to create CSV-Files but you have to take care which seperators excel uses. For checking that you should create a spreadsheet in excel and save it as csv and take a look into that file using any text-editor.
Another approach is to use SpreadsheetML and here a link to the msdn XML Spreadsheet Reference
Otherwise just create a simple xlsx-file with excel, unzip that file and take a look into that the unziped files.

How to most effectively automate repetitive Excel task?

I want to automate Excel using Perl to do the following task(s):
For a list of Excel .xls files, do the following:
Open the file
Set Format to CSV
Save the file under the original filename and directory, but replace the extension "xls" with "csv"
Close the file
End
I found how to open files, even how to save them. I did not find how to change the fileformat/save as a different format. There shall be no user dialogs popping up, it should be fully automated. The Excel file list I can generate myself, a parameterized "find" or maybe "dir" should suffice.
If you are using Excel automation a great help is Excel itself. Use the VBA environment (Alt+F11) to get help for the Excel objects you want to use.
The objectbrowser (F2) is very valuable.
Workbook.SaveAs([Filename], [FileFormat], [Password], [WriteResPassword], [ReadOnlyRecommended], [CreateBackup], [AccessMode As XlSaveAsAccessMode = xlNoChange], [ConflictResolution], [AddToMru], [TextCodepage], [TextVisualLayout], [Local])
Searching for CSV in the object browser will show Excel constants with their values, since you probably cannot use these Excel constants in Perl.
See Spreadsheet::ParseExcel and xls2csv, they will help you.

export mysql database to excel by php

I want to export my database to an excel file by php,I need a source code in php to do this
I'm not going to write your whole program for you (that's not what this site is about) but if you have a specific problem, feel free to post another question.
It looks like PHP has a built-in function to export an array to a line in a CSV file: fputcsv. So run your query and for each row returned, call fputcsv.
Or, just use mysqldump which claims to support dumping to natively support dumping a database to CSV.
PLEASE NOTE!
Exporting Records to .csv is not the same as exporting records to MX Excel .csv.
First and foremost, the source code is out there. Not problem finding it.
The difference though is with Excel, with you are separating with commas and encapsulating with ", Excel escapes quotes (") with an additional quote (so it looks like "").
This means you can't simply use addslashes when trying to export.
This is not meant any harm. If you need the sourcecode for an CSV export (lot of code available at php.net) the phpBlocks is maybe the right tool for you. Export to CSV without
coding. Click&Point like Google's AppInventor.
see: http://www.freegroup.de/software/phpBlocks/demo.html