How to Downlaod a Excel file using FTP- -JSP
Hi..i am dynamically generating excel file(i.e...writing into the excel file from Acees databse after executing the queries on it)...i have set the content-type to vnd-msexcel ....now i want that file to be downlaoded using FTP...FTP is new to me...any help could be greatly appreciated...
Thanks in advance....
JavaWorld published an article about this topic. It is called "Java FTP client libraries reviewed" and it can be found here :
http://www.javaworld.com/javaworld/jw-04-2003/jw-0404-ftp.html
Best regards
Jean-Pierre Norguet
Jean-Pierre Norguet
JavaWorld Press
http://wasa.ulb.ac.be/jp.html
Similar Messages
-
How to upload an excel file using ABAP.
Hi,
Can anyone please help me in understanding how to upload an excel file using ABAP.
Thanks!!http://diocio.wordpress.com/2007/02/12/sap-upload-excel-document-into-internal-table/
check the link
TYPES: Begin of t_record,
name1 like itab-value,
name2 like itab-value,
age like itab-value,
End of t_record.
DATA: it_record type standard table of t_record initial size 0,
wa_record type t_record.
DATA: gd_currentrow type i.
*Selection Screen Declaration
PARAMETER p_infile like rlgrap-filename.
*START OF SELECTION
call function ALSM_EXCEL_TO_INTERNAL_TABLE
exporting
filename = p_infile
i_begin_col = 1′
i_begin_row = 2′ Do not require headings
i_end_col = 14′
i_end_row = 31′
tables
intern = itab
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. Problem uploading Excel Spreadsheet
endif.
Sort table by rows and colums
sort itab by row col.
Get first row retrieved
read table itab index 1.
Set first row retrieved to current row
gd_currentrow = itab-row.
loop at itab.
Reset values for next row
if itab-row ne gd_currentrow.
append wa_record to it_record.
clear wa_record.
gd_currentrow = itab-row.
endif.
case itab-col.
when 0001′. First name
wa_record-name1 = itab-value.
when 0002′. Surname
wa_record-name2 = itab-value.
when 0003′. Age
wa_record-age = itab-value.
endcase.
endloop.
append wa_record to it_record.
*!! Excel data is now contained within the internal table IT_RECORD
Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop. -
How to extract the excel file using web dynapro
Hi Expert,
I want to know how to generate an excel file to extract the internal data. Please give me your help.
Thanks in advance.I think you you can use File download UI element. Refer following link for more info:
[FileDownload|http://help.sap.com/saphelp_tm60/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm]
Regards,
Saket -
How to read the excel file using webdynpro abap?
Hi,
how to read and modify excel file using webdynpro abap?
Regards,
PavaniFor reading excel file follow the steps :
1. Use a File upload UI element and bind it with xstring.
2. Now your excel will be uploaded and stored in Xstring.
3. Convert Xstring to String data using FM 'HR_KR_XSTRING_TO_STRING'.
4. Now split the string at new line so as to make an internal table .
Ex . SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE it_table.
here it_table is type table of string.
5.now loop at the internal table and separate the content of this table separated by tab.
Ex. SPLIT wa_table AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_new.
it_new type string_table.
6. For more info , refer this thread :
Re: How to upload excel file in Webdynpro application using ABAP -
How to upload a excel file using BDC
how should i upload a file using BDC
i have downloaded a excel file containing the values of table A006 a X server.
now i hav to upload it into new server Y server using BDC , how do i do it?
wat all things one shud consider ?Hi,
This is very simple, follow the below mention steps to do so:
1.Declare an internal table having same structure as db table, but take all the fields type as 'C' and length same as defined in the table.
TYPES:BEGIN OF it,
key(20) TYPE c,
indicator(20) TYPE c,
bldat(20) TYPE c,"bkpf-bldat
budat(20) TYPE c,"bkpf-budat
END OF it.
DATA: itab TYPE STANDARD TABLE OF it,
wa TYPE it.
2.Include TRUX as type pool and declare a variable of type trux_t_text_data to be passed in the FM that actually reads data from excel sheet into above declared intrenal table.
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
3. Call the FM 'TEXT_CONVERT_XLS_TO_SAP' and pass the file name and the internal table name into the parameter
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR = 'X'
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = p_file "name of the excel file
TABLES
i_tab_converted_data = itab[] "internal table where data will be stored
EXCEPTIONS
conversion_failed = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
4. loop at internal table and modify the ztable/dbtable where data to be upload .
Hope this solve your problem.
Pooja -
How to format a excel file use java.
hi,
everyone, i meet a problem.i want to write a excel file use java.i can use .csv input the date to excel.but i want to know how to format it.
thanks
Jovehi,
everyone, i meet a problem.i want to write a excel
el file use java.i can use .csv input the date to
excel.but i want to know how to format it.
thanks
JoveIf I understand your question correctly you need to know the format of a .csv file for use in an Excel spreadsheet. A .csv file is a comma-delimited file so all that you need to do is write your data elements to the file with commas in between them. Having done something similar in the past, let me warn you that when Excel is reading your file, it uses some characters other than commas as field delimiters. for example, / : and ; are treated as commas. To defeat this, you will need to surround fields containing those characters in double quotes.
Hope that helps
Mark -
How to Create a Flat File using FTP/File Adapter
Can any body done workaround on creating the Flat file using FTP/File Adapter?.
I need to create a simple FlatFile either using of delimiter/Fixed length. using the above said adapters we can create XML file, i tried concatinating all the values into a single String and writing into a file, but it does not have proper structure
Can any body help me out on this..
Thanks
RamYou can create a text schema while creating a File Adapter. If schema is specified for File Adapter, it takes care of converting XML into fixed length or delimited format.
Thanks,
-Ng. -
How to upload and download files using FTP to a server(webserver) in JSP
I have to upload and download multiple files Of(size >5 MB)using FTP to a
Server(webserver) in JSP
how to do that ?Or he could create his own tag libraries, no? :)One supposes that, technically, one could create a taglib wrapper around an existing FTP library. There might be licensing issues with distributing that taglib wrapper.
Of course, one could find the FTP RFC online, read it, and implement one's own FTP client implementation, complete with a tag library access point. -
How to generate an EXCEL file using module parameter??
Hi,
I ha ve a file to file scenario, where the output file format will be EXCEL. I know this is possible using Module Parameters. But I can't find a helpful blog.
So please help me. Its urgent.
Thanks in advance,
Dwaipayan DeHi,
Now excel file is generating. But the file is containing only the header part. I have used the following XSLT code :-
<?xml version="1.0" encoding="utf-8"?>
<?mso-application progid="Excel.Sheet"?>
<xsl:stylesheet version="1.0"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<xsl:template match="/">
<Workbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom" />
<Borders />
<Font />
<Interior />
<NumberFormat />
<Protection />
</Style>
<Style ss:ID="s21">
<Font ss:Size="22" ss:Bold="1" />
</Style>
<Style ss:ID="s22">
<Font ss:Size="14" ss:Bold="1" />
</Style>
<Style ss:ID="s23">
<Font ss:Size="12" ss:Bold="1" />
</Style>
<Style ss:ID="s24">
<Font ss:Size="10" ss:Bold="1" />
</Style>
</Styles>
<Worksheet ss:Name="Page1">
<Table>
<xsl:call-template name="XMLToXSL" />
</Table>
</Worksheet>
</Workbook>
</xsl:template>
<xsl:template name="XMLToXSL">
<Row>
<Cell>
<Data ss:Type="String">SupplyOfficeCode</Data>
</Cell>
<Cell>
<Data ss:Type="String">WorkOrderNo</Data>
</Cell>
<Cell>
<Data ss:Type="String">ApplicationNo</Data>
</Cell>
<Cell>
<Data ss:Type="String">ApplicationType</Data>
</Cell>
<Cell>
<Data ss:Type="String">ApplicantName</Data>
</Cell>
<Cell>
<Data ss:Type="String">DateOfIssueOfWO</Data>
</Cell>
<Cell>
<Data ss:Type="String">ApplCreationDate</Data>
</Cell>
<Cell>
<Data ss:Type="String">WorkOrderStatus</Data>
</Cell>
<Cell>
<Data ss:Type="String">DateOfCanOfWO</Data>
</Cell>
</Row>
<xsl:for-each
select="//Record">
<Row>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="SupplyOfficeCode" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="WorkOrderNo" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="ApplicationNo" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="ApplicationType" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="ApplicantName" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="DateOfIssueOfWO" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="ApplCreationDate" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="WorkOrderStatus" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="DateOfCanOfWO" />
</Data>
</Cell>
</Row>
</xsl:for-each>
</xsl:template>
<xsl:template match="GetWorkOrderDetailsinEXCEL">
</xsl:template>
</xsl:stylesheet>
In the communication channel, full message is passing(including header and body part). But when the excel file is generating, it is containing only the header part. No message body is present there.
Please help me to solve this proble.
Thanks and Regards,
Dwaipayan De -
How to append two CSV files using ftp
Hi
Please let me know the FTP command to append the two .CSV files into one .CSV file.
e.g.
Let me explain:
one CSV file has the fields F1 , F2, F3 , F4 and has 5 records
another CSV file has the same sequence of fields F1, F2, F3, F4 and has 10 records
after appending both the files , I must get 15 records.
Thanks
AlokOk I will try out.
I am illustrating my requirement as follow
File#1 (type .CSV)
F1 F2 F3 F4
100 566 89 86
235 256 56 12
File#2 (type .CSV)
F1 F2 F3 F4
56 56 98 102
12 23 36 523
23 56 56 89
Now we want to Append File#1 to File#2 as follow:
F1 F2 F3 F4
100 566 89 86
235 256 56 12
56 56 98 102
12 23 36 523
23 56 56 89
Please suggest now that which command would be appropiate.
Alok -
How to open a excel file in WLS 8.1 server.
Dear Sir,
I have created a excel file in WLS 8.1 Application server.
Now I used method as redirectURL(req,resp,Population.xls) to open that file but it failed to open it.
If I give the full path as 'D://USER_OBJETS/APPLICATION/Population.xls'
but it tried to open from client PC not from the server.
so the problem, I managed to create file in server but unable to open it.
Kindly advise how to resolve this problem.
Thanks and Rgds,
Anandan-Singapore.Are you asking in general how to read an Excel file using ActiveX, or are you asking specifically? If you're asking in general, please do a search, as there have been many examples posted on how to use ActiveX to read/write Excel files. There are also numerous links in the Excel thread.
-
CRM ABAP How to upload an Excel file into an internal table?
How to upload an Excel file using GUI_UPLOAD?? what should be the values of the parameters? The function modules ALSM_EXCEL_TO_INTERNAL_TABLE and KCD_EXCEL_OLE_TO_INT are not present in CRM. Please suggest me a way out!
Hi saurabh,
you can try the folowing sample..
and make modifications according to your requirement..
TYPE-POOLS: truxs.
DATA: i_text_data TYPE truxs_t_text_data,
v_filename_string TYPE string.
DATA: BEGIN OF itab OCCURS 0,
Name(30),
Phone(15),
Fax(500).
DATA: END OF itab.
PARAMETERS: p_file LIKE rlgrap-filename.
START-OF-SELECTION.
v_filename_string = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_filename_string
filetype = 'ASC'
has_field_separator = 'X'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
dat_mode = ''
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = i_text_data
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
* I_LINE_HEADER =
i_tab_raw_data = i_text_data
i_filename = p_file
TABLES
i_tab_converted_data = itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
this is a sample code that uploads a excel file using GUI_UPLOAD, but uses another function module to convert that uploaded data into an internal table..
regards
satesh -
How can I create an csv/excel file using pl/sql and then sending that file
How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.968776 wrote:
How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
Whay do you want database (pl/sql) code to do these things?
Anyhow, you may be interested in :
{message:id=9360007}
{message:id=9984244} -
How to read MS-Excel file by using file Adapter
hi friends,
I have an issue on read Operation by using file Adapter.
It is necessary to read excel file by using file adapter. But in the native format of file adapter there is no option to read excel type of files.
So friends, please help me how to solve this problem?
Thanks in Advance..See also this post:
Read Excel File Using FileAdapter in SOA 11g
It might help you -
How to send Excel File using file adapter
Hello,
Please could you tell how i can send an excel file using the file adpater?
thank you.Hi hassiba ,
If u want to doc on creating modules just check the wonderful document.
How To Create Modules for the J2EE Adapter Engine at service.sap.com. It will clear all the basics of creating Adapter module.
https://websmp102.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
Thanks ,
sekhar.
Maybe you are looking for
-
IP routing utilizing Verizon private network (GRE tunnel) with remote cellular gateways
Okay, I give up, and think I have done my due diligence (I have been engrossed and fascinated spending many more hours than allotted to try and learn some of the finer details). Time for some advice. My usual trade is controls engineering which gen
-
It isn't every time, and sometimes doesn't happen for a long time, then I'll go to a bookmark or toolbar link and the new window opens behind the one I was on. Example: I just opened a second window (CTRL N) and clicked on a bookmark. It opened a new
-
Dequeuing messages not working
I am trying to dequeue messages through the use of a java durable subscriber. That is the only subscriber. I successfully get the message and then call the method _session.commit();. Neither throw any errors and I am confused as to why the queue show
-
Spry Sliding Panels - Next Link
I was hoping that someone might be able to give me a hand in modifying the sample code for the Spry SlidingPanels from a dataset. I'm able to display 4 panels but the "Next" link in the sample has been designed to show only on the even records rather
-
How to achieve synchronization after DCP connection string changed via sdk
Hi guys, i have modified the DCP connection string using method: metaDataProperties.setProperty("SI_METADATA_BVCONN_ATTRIBUTES", new string here) via BOE SDK for java, and then checked it through Query Builder :select * from CI_APPOBJECTS where SI_