Query - Download as CSV file
Hi,
By using Query (SQ01), we are able to download data in Excel format, Text format, etc. But... is there an option that I can download in CSV format.
Thanks.....
Rgds,
Kian
Hi Kian,
you could save the Excel file in CSV format, couldn't you?
Regards
Bernd
Similar Messages
-
How to get fixed field length when download a CSV file ?
hi all ,
I had downloaded a CSV file from an ALV list which created by myself. the current layout of the CSV file is :
aaa;bbbbbbbbbb;cc;
for example . but what i want is :
aaa ;bbbbbbbbbbb ;cc ;
it means these three fields are all with fixed length don't ommitting spaces when you preview the CSV file. how should i do this ?
best regards
Kevini got the solution.
-
Hi,
I am trying to export a Query result to CSV in comma-delimited tab format.
In SBO it is allowing to save the query results as CSV file; but when I opened
it is in 'Text Unicode' filetype.
Is there anyway save it directly as CSV in comma-delimited tab format.
Thanks Regards
ShivaHi Gordon,
Sorry could not reply soon.
Its a smiple query
"SELECT ItemCode, ItemName, ItmsGrpNam,
LeadTime, VATLiable, CardCode"
The things is we might make some changes to it based on customer requirement. But the fact is no matter what query, I have no problem with query. It is while saving it is making a 'tab-delimited' file rather than 'comma-delimited file'. User has to manually open it and save it as CSV file.
Regards
Shiva -
Downloading a .csv file as excel sheet
hi,
does anyone know how to ensure that when downloading a csv file, it will be opened with excel only. The browser is downloading it as a text file and not excel. how can this be prevented.
please let me know if you have any ideas since i've been pondering over it for far too long and need help...
thanks
jeenaYes, you need to set the content type to "application/vnd.ms-excel". Of course there is no guarantee that your clients will interpret that to mean "Open with Excel", or that they will even have Excel installed on their system, but there's not much you can do about that.
-
When downloading a .csv file in Safari, it adds .xls, making the file filename.cvs.xls
If I rename the file, it opens just fine, if I don't it opens all in one column.
I had found a fix on my old macbook, but just got a new MBP and it's happening again.
Can't remember or find where the fix is.
Thanks!Safari: Downloaded file's filename may have an additional extension
http://support.apple.com/kb/TA24293
That's from June 11, 2007!
Working from my defective memory, this happened to me, but stopped if I unchecked 'Open safe files after downloading' in Safari Preferences/General.
At least I think that's how I stopped it - it hasn't happened since! -
Letting users download a CSV file
I need to add a link to some html code generated by a servlet that will allow users to download a csv file. The problem is that the only other link I have seen function like that was in a static html page and it simply used a href tag to identify the csv file and the user was automatically asked whether to open it or save it to their PC. When I use such a link in the servlet, the servlet displays the contents of the file in a browser window instead of giving the user the option to save it to their PC. Can someone please help me?
Are you generating the CSV file with a servlet? If so, try this:
response.setContentType("text/x-csv");
response.setHeader("Content-disposition", "inline;filename=MyOutputFile.csv"); -
Hi,
Working with Download to csv file feature I realized that for one of my reports that contains an icon (with a link) in one of the columns, is not getting any value for this column in the csv file.
This behaviour is logical due to the fact that we have an image, not a string.
But, is there a way I can edit or force the Download to assign a string value for every icon I have in my report, so when I click in Download, the icon will be represented as a string in the new csv file?
Thanks
Ivoi'd bet the easiest way to approach this would be to select both your icon and your "string value" columns out of the database and to then use column conditions to determine which columns should be rendered in which output format. so say you had a report that just showed images in one col and a description in the next. i'd write your report to select something like...
select '<img src="'||m.image_path||'">' my_image, m.image_name name, m.image_description
from my_image_table m
...and then i'd a put condition of type "PL/SQL Expression" like...
not htmldb_application.g_excel_format
...on your my_image column. i'd also put a "PL/SQL Expression" condition on your Name column like...
htmldb_application.g_excel_format
...we talked about this a bit in...
Excel Report
...but basically htmldb_application.g_excel_format is just a function that returns a boolean telling you whether or not the HTML DB engine is in the mode of show your page in csv format. anyhow, give it a shot and let us know if you need further assistance.
regards,
raj -
How to approach for downloading a CSV file?
I'm running the following query and QoQ . Could you tell me how should I proceed for the "Download CSV" file option?
<!--- QoQ for FIRSTCONN --->
<cfquery datasource = "XX.XX.X.XX" name="master1">
SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as FIRSTCONN
, COUNT(Timedetail) as FIRSTOccurances
, EVENTS
FROM MyDatabase
WHERE EVENTS = "FIRST"
GROUP BY FIRSTCONN ;
</cfquery>
<!--- Detail Query --->
<cfquery dbtype="query" name="detail1">
SELECT *
FROM master1
WHERE FIRSTCONN >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">
AND FIRSTCONN < <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;
</cfquery>
<!--- QoQ for SECONDCONN --->
<cfquery datasource = "XX.XX.X.XX" name="master2">
SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as SECONDCONN
, COUNT(Timedetail) as SECONDOccurances
, EVENTS
FROM MyDatabase
WHERE EVENTS = "SECOND"
GROUP BY SECONDCONN ;
</cfquery>
<cfquery dbtype="query" name="detail2">
SELECT *
FROM master2
WHERE SECONDCONN >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">
AND SECONDCONN < <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;
</cfquery>
<cfchart format="flash" chartwidth="1000" chartheight="500" scalefrom="0" scaleto="50000" xAxisTitle="Dates" yaxistitle="Number of Connections">
<cfchartseries query="detail1" type="line" itemColumn="FIRSTCONN" valueColumn="FIRSTOccurances" >
<cfchartseries query="detail2" type="line" itemColumn="SECONDCONN" valueColumn="SECONDOccurances" >
</cfchartseries>
</cfchart>
The cfform code I'm using is as follows:
<cfform format="flash" preloader ="false">
<cfformgroup type="horizontal">
<cfinput type="dateField" name="startdate" label="Start Date" width="100" value="#form.startdate#">
<cfinput type="dateField" name="enddate" label="End Date" width="100" value="#form.enddate#">
<cfinput name="submitApply" type="submit" value = "Apply">
<cfinput name="cancel" type="submit" value="Download CSV">
</cfformgroup>
Desired Output:
I have attached the image for the output below. Please find it attached.
Basically, if a date range is 21June to 21 July. The output must be as shown in the image. (I have omitted THIRDCONN etc for the sake of simplicity in my code).
Please let me know how should I go about this problem and let me know if I can answer more questions.It's not built into the language. Your best bet is probably to put the CSV-Reading logic into its own class.
Or find one of the thousands of classes that already implement such a thing. -
In internet explorer I use to be able to click on a download link to have a csv file open in excel. I have never been able to open this download file before with Firefox. It turns out that I can no longer do it with Explorer either. I have sent this same question to them for help as I require this information. It is being downloaded from a secure site and is used for registration information.
I need help as soon as possible.
Thank you
RobSee:
*Firefox/Tools > Options > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
The setting in "Tools > Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
See also:
*https://support.mozilla.com/kb/Options+window+-+Advanced+panel#General_tab
*http://kb.mozillazine.org/accessibility.blockautorefresh
*http://kb.mozillazine.org/Accessibility_features_of_Firefox -
How to Export BW Query Report to .csv file
I try to export BW QueryReport to .csv file using ReportAgent and URL command in WEB Template:
<SAP_BW_URL DATA_PROVIDER='VIEW1' CMD='EXPORT' FORMAT='CSV'>
but can't find the result file.
Is someone have experience in exporting BW Reports to file in automatic way?Another way to do it would be to use transaction RSCRM_BAPI.
Not ideal for large volumes but allows you to extract from a query.
Regards,
Mike -
How to download a CSV file to a shared network folder ?
Hi Experts,
I have created a report which exports a CSV file on application server using scheduled background job. I have used the OPEN DATASET feature to download the file on a location on the application server which is working fine.
But my requirement is that I have to download this file to a shared folder which is situated on another location and is shared in my application server as 'N' drive. But when I give the path of this N drive in my report, its giving runtime error that the <filename> is not open.
So pls help me how to give path to such shared network folder to download the file?
Thanks,
Vishal .Hi Guys,
I tried alot but it didnt work.
SO I decided to export the file on the application server only.
I created a background job that runs periodically and exports the file to C drive of the application server.
The job run sucessfully only the first time but gets cancelled after that.
I ran the job for an hour but not a single time it finished successfully. Every time it was cancel with dump error shown below.
+++++++++++++++++++++++++++++++++++++++++++
Category ABAP Programming Error
Runtime Errors DATASET_NOT_OPEN
Except. CX_SY_FILE_OPEN_MODE
ABAP Program ZBATCHSTOCK
Application Component Not Assigned
Date and Time 01.08.2014 18:52:13
Short text
File "C:\GOOGLE_SAP\BATCH_DETAILS.CSV" is not open.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZBATCHSTOCK" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
++++++++++++++++++++++++++++++++++++++++++++++++++++++
And the same background job runs properly on development server without any cancelled job.
So pls help me what should be the problem ??
Thanks,
Vishal -
Export query results into .csv file?
Hello I have a T-SQL script that gets row counts for a specified date range and then needs to loop (by incrementing +1 day to get the next day's counts) for a large date range. I'm aiming to output & append each query results day counts
into a .csv file via a SQL Agent job since this will take quite a while to complete.
Would using the following as an example template...
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0','Text;Database=D:\;HDR=YES;FMT=Delimited','SELECT * FROM [FileName.csv]')
SELECT Field1, Field2, Field3
FROM DatabaseName
...be the method or something else?
If this is good to use I've tried running this but get the following error:
Msg 7357, Level 16, State 2, Line 76
Cannot process the object "SELECT * FROM [FileName.csv]". The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" indicates that either the object has no columns or the current user does not have permissions
on that object.
Thanks in advance.Hi Techresearch7777777,
The error in your post says that the file FileName.csv has to be created with the column names in the first row. Like:
Field1,Field2,Field3
Either you can create a schema.ini file under the same folder:
[FileName.csv]
Format=CSVDelimited
ColNameHeader=False
Col1=Field1 [DataType]
Col2=Field2 [DataType]
Col3=Field3 [DataType]
For the [DataType],you can reference
Schema.ini File (Text File Driver)
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
How to use auto fit selection when downloading to csv file
hi,
I am working on reports, i need to download to a .csv file. I am using GUI_DOWNLOAD is there any option for it where text fits exactly in a single cell.
For Eg:
I excel there is an option (Format-column-Autofitselection).
Then the column size increases or decreased according to the text size.Dear Josephine,
There is no option the way you want of autofit. Rather while opening the CSV in excel u can do the required formatting.
Regards,
Deva. -
Download to CSV file using FLEX
Hi,
I have download to CSV working fine, but i need the filename along with extension "CSV" when filereference object opens in browser,
though i included CSV in the filename flex is ignoring it..
Can anybody let me know how i can accomplish what i am looking for ?
Thank You...Anu
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import sample.DataGridDataExporter;
import flash.net.FileReference;
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import mx.controls.Alert;
private static const CSV_DOWNLOAD_END_POINT:String = "http://q0571478:9081/CsvFile/servlet/GetCSV";
private var downloadFileRef:FileReference = null;
private function exportCSV ():void
var csvData:String = DataGridDataExporter.exportCSV (dg);
console.text = csvData;
if (csvData.length > 0)
downloadCSV (csvData);
private function downloadCSV (csvData:String):void
if (!downloadFileRef)
downloadFileRef = new FileReference();
var request:URLRequest = new URLRequest();
var fileName:String;
fileName = "ccdownload.csv";
request.url = CSV_DOWNLOAD_END_POINT;
request.method = URLRequestMethod.POST;
request.data = new URLVariables ("csvdata=" + csvData);
downloadFileRef.download(request, fileName);
]]>
</mx:Script>
<mx:XMLList id="employees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
<employee>
<name>Maurice Smith</name>
<phone>555-219-2012</phone>
<email>[email protected]</email>
<active>false</active>
</employee>
<employee>
<name>Mary Jones</name>
<phone>555-219-2000</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
</mx:XMLList>
<mx:Panel title="DataGrid Control Example" height="100%" width="100%"
paddingTop="10" paddingLeft="10" paddingRight="10">
<mx:Label width="100%" color="blue"
text="Select a row in the DataGrid control."/>
<mx:AdvancedDataGrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{employees}">
<mx:groupedColumns>
<mx:AdvancedDataGridColumn dataField="name" headerText="Name"/>
<mx:AdvancedDataGridColumn dataField="phone" headerText="Phone"/>
<mx:AdvancedDataGridColumn dataField="email" headerText="Email"/>
</mx:groupedColumns>
</mx:AdvancedDataGrid>
<mx:Button label="Export CSV" click="exportCSV ()"/>
<mx:TextArea id="console" width="100%" height="100%" />
</mx:Panel>
</mx:Application>this opensource component has a good sample about copying datagrid data, is not CSV but is Excel compatible (it should be easy to change to CSV)...
http://flexed.wordpress.com/2007/08/15/customgrid-v12/
if you need help uploading the file to the server you could take a look in the Flex Documentation for fileupload or FileReference and you should get some examples
HTH
Gus -
When I attempt to download a zipped CSV file in Firefox, the usual pop-up window appears asking what Firefox should do with this file... even after I select "Open with" and choose my Zip File Manager and tick the box that says "Do this automatically for files like this from now on", this pop-up continues to appear every time I come to download files
@Corel
Thanks, I had forgotten all about potential server side problems.
@Conners81 <br/>
If sample problem files and links are publicly available maybe you could include an example of the link being used, preferably to one of the smaller simpler files.
*What is the website you are using?
For comparison an example you may like to try
* site providing .csv data [http://www.ofcom.org.uk/static/cmr-10/WAL-3.4.html]
** a small few lines csv download file [http://www.ofcom.org.uk/static/cmr-10/csv/WAL-3.4.csv]
** similar info as a pdf chart [http://www.ofcom.org.uk/static/cmr-10/pdfs/WAL-3.4.pdf]
Of course you have the added complication of the zipped file.
Maybe you are looking for
-
Sometimes itunes does not play songs
From time to time my itunes stops playing: When I select a song in my library or a song in the itunes store, the song is displayed at the top, but itunes does not start playing. Additionally, it won't play any other song. When I close the itunes soft
-
How to configure the services(WDA) in ESS with EHP7
Hi Experts, I have a requirement to configure ESS/MSS in R/3 . fisrt time am going to configure the ESS/MSS in R/3 with EHP7.currently we are using ECC6.0 EHP7 with SP 2 and portal 7.4 can any one help me out which business functions need to be act
-
How to search more than one table in database?
Hello i am new to java I create 5 tables. I want search 5 table. I use stored procedure. we give one keyword that keyword in all tables that column will be display. for ex: One tables contains IT employee details of one company and they are working d
-
on doing Make all in Oracle BRM Code //variable declaration and initialisation time_t rg_end_t=0; //use rg_end_t = fm_utils_cycle_next_by_nunits(cycle_start,prod_unit,prod_term,ebufp); //error returned undefined reference to `fm_utils_cycle_next_by_
-
New keyboard features on old MacBooks?
Does anyone know a way to use the features of the new MacBook keyboards (i.e. the same ones as the aluminum Apple keyboards) with old MacBooks?