How to create an Excel sheet in side the Studio, and wirte somethiing
actually i want to create one excel sheet and in that i want to place some data.
can anybody help me..?
Hi,
In addition to the post I made on http://forums.bea.com/bea//thread.jspa?forumID=600000022&threadID=300003034 to add a template that has the header and formatting information you want you could use logic like this:
templateName as String = "C:/Student/Excel/InvoiceTemplate.xls"
newFileName as String = "C:/Order" + orderNumber + ".xls"
// *** Warning ***
// This next statement makes Excel visible
// and should only be done for testing
// purposes. Normally, this would be
// run on the server with no human
// interaction
xl.visible = true
// To open an existing Workbook use this syntax:
workBookTemplate = open(xl.workbooks, filename : templateName)
// Save as the filename you want. Including the orderNumber
// variable simply ensures that the invoice is unique by the order
// number.
saveCopyAs workBookTemplate
using filename = newFileName
// Now open the new Workbook that you just created
workbookNew = open(excel.workbooks, filename : newFileName)
Hope this gets you going,
Dan
Edited by datwood at 04/29/2008 7:56 AM
Similar Messages
-
On excel sheet upload read the workbook and populate data to sharepoint list
Requirement in my current project:
In a document library when I upload an excel sheet, a specific workbook has to be read and the contents have to be uploaded to a sharepoint custom list.
The approach followed was create an event receiver and register as a feature. Following is the code for event receiver.
public override void ItemAdded(SPItemEventProperties properties)
base.ItemAdded(properties);
var list = getSPList("{150301BF-D0BD-452C-90D7-2D6CD082A247}");
SPListItem doc = properties.ListItem;
doc["Msg"] = "items deleted from req list";
doc.Update();
string excelname=doc.File.Name;
System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "calling read excel");
string filepath = doc.File.Url.ToString();
doc["Msg"] = "excel name" + excelname + filepath;
doc.Update();
readExcel(excelname,filepath);
private static SPList getSPList(String SPListGuid)
// SPSite Site = SPContext.Current.Site;
SPSite Site = new SPSite("http://omistestsrv:32252/sites/OMD");
SPWeb web = Site.OpenWeb();
Guid listid = new Guid(SPListGuid);
web.AllowUnsafeUpdates = true;
SPList List = web.Lists[listid];
return List;
private void readExcel(string excelname,string filepath)
try
SPSecurity.RunWithElevatedPrivileges(delegate()
using (SPSite Site = new SPSite("http://omistestsrv:32252/sites/OMD"))
SPWeb web = Site.OpenWeb();
string workbookpath = web.Url + "/" + filepath;
web.AllowUnsafeUpdates = true;
var _excelApp = new Microsoft.Office.Interop.Excel.Application();
System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "iside read excel");
//my code breaks or fails when cursor reaches this statement. I am not able to open the excel sheet, there is no //problem related to the permission. same code snippet works in a console application. but when tried as an
event //handler in sharepoint it breaks. can anyone help me to resolve the problem
workBook = _excelApp.Workbooks.Open(workbookpath, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing,
Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing);
System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "after excel open");
int numSheets = workBook.Sheets.Count;
// Iterate through the sheets. They are indexed starting at 1.
System.Diagnostics.EventLog.WriteEntry("ExcelUpload", numSheets.ToString());
for (int sheetNum = 12; sheetNum < 13; sheetNum++)
System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "inside first for
loop");
Worksheet sheet = (Microsoft.Office.Interop.Excel.Worksheet)workBook.Sheets[sheetNum];
Microsoft.Office.Interop.Excel.Range excelRange = sheet.get_Range("A13",
"P89") as Microsoft.Office.Interop.Excel.Range;
object[,] valueArray = (object[,])excelRange.get_Value(
Microsoft.Office.Interop.Excel.XlRangeValueDataType.xlRangeValueDefault);
var list = getSPList("{150301BF-D0BD-452C-90D7-2D6CD082A247}");
for (int L = 1; L <= excelRange.Rows.Count; L++)
string stringVal = valueArray[L, 1] as string;
if ((valueArray[L, 1] != null) && (!string.IsNullOrEmpty(stringVal)))
System.Diagnostics.EventLog.WriteEntry("ExcelUpload",
"inside second for loop");
SPListItemCollection
listItems = list.Items;
SPListItem item = listItems.Add();
item["Product"] = valueArray[L,
1];
item["App"] = valueArray[L,
2];
web.AllowUnsafeUpdates
= true;
item.Update();
web.AllowUnsafeUpdates = false;
//Or Another Method with valueArray Object like "ProcessObjects(valueArray);"
_excelApp.Workbooks.Close();
//workBook.Close(false, excelname, null);
//Marshal.ReleaseComObject(workBook);
catch (Exception e)
System.Diagnostics.EventLog.WriteEntry("ExcelUpload", e.Message.ToString());
finally
System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "finally block");
Is this the only approach to meet this requirement or is there any other way to crack it. sharepoint techies please help me.as you described the scenario of the event that it should happen when user upload excel to a document library. Event Receiver is your best bet. However if you would have a requirement that users can send excel files any time to a network file location and
you want to pick it, read it and create list items etc. You would write a sharepoint timer job that would run every 10 minute to check for file and if available on the network drive, perform the operation etc. so that users who send excel file does not need
to come to the sharepoint etc. You can see that you have Event Receivcer option or Timer job option OR you would write a console application to trigger the code at a scheduled time on sharepoint server etc. so you are using the event receiver in the correct
scenario.
Moonis Tahir MVP, MCPD, MCSD.net, MCTS BizTalk 2006/SQL 2005/SharePoint Server 2007 (Dev & Config) -
How to connect to excel sheet and create a universe on top of that
hi,
can any tell me how to connect to excel sheet and create a universe on top of that.what connection should i keep.Hi Vishal,
Here is how you can create a universe from an excel file:
Here are the steps to follow:
1. Launch Designer, select the Quick Design Wizard if not already open, and click "Begin".
2. Type in a universe name then click "New".
3. Select the Network layer "ODBC Drivers" and then click OK.
4. In the ODBC Drivers window, select the "Login" tab and then type in a name for this connection.
5. Select "Generic ODBC data source" from the drop-down list for database engine.
6. Click the "ODBC Admin" button to define data source name.
7. In the ODBC Data Source Administrator window, click Add.
8. Select "Microsoft Excel Drivers" and click Finish.
9. Enter a data source name.
10. Click "Workbook", select the file you want to access, and click OK.
11. Locate and select the data source name from the drop-down list.
12. Click "Test" to make sure that the server is responding.
You will be back at the Quick Design Wizard "Step 1 of 4". Click the "Next" button and follow through the rest of the steps in order to complete the universe.
-Shreyash -
How to Get the excel sheet formula from the server side into the j2me app?
How to Get the excel sheet formula from the server side into the j2me application?
Here the excel sheet is in server side.i want to do get the excel sheet values (only some part of the excel sheet based on some conditions) from server side into j2me.In j2me I want to done some client side validation based on the formula of excel sheet.Then i resend the new updated data to the server.
But here deosn't know any mehtod to get the excel sheet formula from server side.So kindly help me to get the excel sheet formula from the server.
So how to get the excel sheet formula frome the server side into j2me Application...
Plz guide me to solve this issue...
thanks & regards, Sivakumar.JYou should not post a thread more than once. You've crossposted this question to another forum. I have deleted that one.
-
How to store an excel sheet in oracle database
How can I store excel sheet into oracle.
Or you could use Heterogenous Services to treat Excel as an external database:
1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
EXCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
(CONNECT_DATA =
(SID = EXCL)
(HS = OK)
Here SID is the name of data source that you have just created.
3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = <hs_sid>)
(ORACLE_HOME = <oracle home>)
under SID_LIST_LISTENER like:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\ORA9DB)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = ORA9DB)
(ORACLE_HOME = d:\ORA9DB)
(SID_NAME = ORA9DB)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = EXCL)
(ORACLE_HOME = D:\ora9db)
Dont forget to reload the listener
c:\> lsnrctl reload
4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
In this file set following two parameters:
HS_FDS_CONNECT_INFO = excl
HS_FDS_TRACE_LEVEL = 0
5- Now connect to Oracle database and create database link with following command:
SQL> CREATE DATABASE LINK excl
2 USING 'excl'
3 /
Database link created.
Now you can perform query against this database like you would for any remote database.
SQL> SELECT table_name FROM all_tables@excl;
TABLE_NAME
DEPT
EMP -
How to Create MultiSheet Excel Report Output in XML Publisher in Oracle R12
Dear All,
How to Create MultiSheet Excel Report Output in XML Publisher in Oracle R12.
My Requirement is to develop RTF Template and geneate Excel output in Multiple sheet.
plz guide me on this..
thnx
Khushalplz see
BI Publisher: How to create Multisheet in Single Excel file using Excel Template [ID 1352000.1]
for r12 you can use excel template
i think it more appropriate for excel output -
How export report into excel sheet automatically using SSRS 2010?
Hi,
I have created many reports using SQL Server Data Tool 2010 and at my work, we are using active batch to ran reports every month.
Now question is, my boss want me to set up reports such a way that when active batch is ran, reports should be exported into excel sheet automatically with the default values given for parameters at some specific folder location. How can I export report
into excel sheet automatically when active batch is executed?
Please help me on this. Thanks for the help in advance.
VickyCheck this:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:/test.xls'
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = t_output
Regards. -
Create Object Excel.Sheet
When I create an Excel.Sheet object, it's creating an Excel 2003 workbook. How do I get it to create an Excel 2007 workbook instead. Is that a BASIS setting somewhere?
That's an OLE2 connection with the Excel installed on the presentation server. I guess you have excel 2007 installed. So maybe your program saves "as excel 2003" instead of "excel 2007".
-
How to get data from excel sheet present in the client(local) system?
hi,
I have to upload the data from an excel sheet present in the local system(not on the server) to the table using webdynpro.
i donot want to upload the excel file
if it is necessary to upload the file then it should be on temporary basis and it should be deleted automatically.
i can get the data from excel sheet which is present in the km using HSSF api but how to do the same if it is in local system?
if anyone has the sample application of this type please give me the link.
thanksYou can use the FM ALSM_EXCEL_TO_INTERNAL_TABLE with Web Dynpro ABAP.
-
How to create a Contact Sheet with Adobe Photoshop CS5 from a disc with images in different folders
I got a disc with images files (mainly ai and psd files) in different folders and subfolders, how can I create a contact sheet including all the image files in different folders. (It seems that Adobe Bridge can only create a contact sheet by clicking the image files directly but not a folder including the images files)
thx!Use the optional Contact Sheet II plugin which is found in Adobe's Downloads:
1) search for contact sheet in PS CS5 help
2) choose the first result and read carefully about the Photoshop Optional Plug-In Picture Packager
3) follow the instructions to download the zip file and note the location that you download it to.
4) follow the instructions to install the files.
I'm not sure how PS CS5 will handle ai vector image files or if you have to batch convert them to raster images first before using Contact Sheet II. Contact Sheet II allows you to choose a folder and Include All SubFolders as an option so you could create a Contact Sheet folder and copy all of your desired folders into that folder which will become subfolders of the main folder you choose for your contact sheet. -
How to convert an excel sheet as pdf and sent mail?
Hi,
I have to open an excel file from report and display a value in a cell, based on that value in excel, macros will automatically trigger and the remaining data will fill in excel sheet.
This sheet i need to convert as pdf and sent as attachment to mail.
Regards,
ShreeHi,
I know how to do with word documents using OLE. But i dont know how to work with Excel sheets.
I have worked on word documents like displaying data in word document from SAP and saving it into local system.
But here my requirement is i need to pass pernr to a cell in an Excel sheet, based on pernr in excel some macros will trigger and fill the details. After that, the filled sheet i need to convert as pdf and sent as mail.
Regards,
Shree. -
How to create rtf template to view report in Word and Excel, with numeric f
Hi,
Please help me!
How to create rtf template to view report in Word and Excel, with numeric formatted fields (like this 999 999 999,99 with spaces between numbers) and then end user be able to process those fields with Excel tools (sum, etc).
Thank you.From what I have seen Excel can not handle 999 999 999.00. You can use 999999999.00 and then format it as you want in the xls bt you can not have values like 999 999 999.00 coming from publisher output and have functions on the values in Excel
Tim -
How i can load excel sheet into a table in oracle through pl/sql procedure
Hi,
How i can load excel sheet into a table in oracle through pl/sql procedure or a pl/sql block. Excel sheet is saved on my c or d drive on my machine. In xls format.Depending on how big your spreadsheet is and how frequently you want to do this you might want to contruct insert statements in excel, then run these. I have done this to load a few hundred rows for a one off test on dev.
e.g. if you have values 1 and 'a' in you spread sheet and want to insert them in to table xxx col1 & 2:
| /| A | B | C
|1 |col1 |col2 |
|2 | 1|a |="insert into xxx ("&$A$1&","&B1&") values ("&A2&",'"&B2&"');"then paste the contents of colum C
insert into xxx (col1,col2) values (1,'a');into sqlplus or a script. -
How to run a excel sheet macro using RH_START_EXCEL_WITH_DATA
Hi All,
I have found out one FM, RH_START_EXCEL_WITH_DATA,
To run the excel sheet marco from the ABAP editor.
DATA_FILENAME
DATA_PATH_FLAG
DATA_ENVIRONMENT
DATA_TABLE
MACRO_FILENAME
MACRO_PATH_FLAG
MACRO_ENVIRONMENT
WAIT
DELETE_FILE
I found these parameters in the FM,
which I need to pass,
Any code sample...
Any hint...
Thanks,
Kalyan Chandramoulihi
good
check with this report.
REPORT Z_DISPLAY_IDOC_AND_DATA line-size 275.
This tool reads an existing Idoc and dispays the contents in a *
spreadsheet format. The spreadsheet (MS-EXCEL) will be automatically *
created if D_EXCEL = 'X'. *
data: idoc_control like EDIDC,
NUMBER_OF_DATA_RECORDS like sy-dbcnt,
NUMBER_OF_STATUS_RECORDS like sy-dbcnt,
INT_EDIDS like edids occurs 0 with header line,
INT_EDIDD like edidd occurs 0 with header line.
TYPE-POOLS : LEDID.
data: STRUCT_TYPE TYPE LEDID_STRUCT_TYPE ,
IDOC_STRUCT TYPE LEDID_T_IDOC_STRUCT,
SEGMENTS TYPE LEDID_T_SEGMENT,
SEGMENT_STRUCT TYPE LEDID_T_SEGMENT_STRUCT,
excel_tab(2000) occurs 0 with header line.
parameter: DOCNUM like edidc-docnum obligatory, ""Idoc Number
sap_rel like SY-SAPRL default SY-SAPRL obligatory,
pi_ver like EDI_VERREC-VERSION default '3' obligatory,
d_excel as checkbox default 'X'. ""Download ?
start-of-selection.
perform read_idoc.
perform process_idoc.
if d_excel = 'X'.
perform download_to_excel.
endif.
end-of-selection.
FORM read_idoc.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
DOCUMENT_NUMBER = docnum
IMPORTING
IDOC_CONTROL = idoc_control
NUMBER_OF_DATA_RECORDS = NUMBER_OF_DATA_RECORDS
NUMBER_OF_STATUS_RECORDS = NUMBER_OF_STATUS_RECORDS
TABLES
INT_EDIDS = INT_EDIDS
INT_EDIDD = INT_EDIDD
EXCEPTIONS
DOCUMENT_NOT_EXIST = 1
DOCUMENT_NUMBER_INVALID = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "" read_idoc
FORM process_idoc.
perform read_idoc_structure.
perform display_data_records.
ENDFORM. "" process_idoc
FORM display_data_records.
data: PE_seg_HEADER like EDI_SAPI01,
segname like EDI_IAPI12-SEGMENTTYP,
prev_segname like EDI_IAPI12-SEGMENTTYP value ' ',
pt_fields2 like EDI_IAPI12 occurs 0 with header line,
PT_FVALUES2 like EDI_IAPI14 occurs 0 with header line,
byte_first type i,
byte_last type i,
field_val(50),
tmp_str(15),
tmp_str3(15),
seg_repeats type i value 0,
tmp_str2(15),
tab_cr(1) type x value '09',
tot_ctr type i value 0,
ctr type i value 0,
msg(40) type c.
data: IDOC_STRUCT_wa TYPE LEDID_IDOC_STRUCT.
sort int_edidd by segnum.
describe table int_edidd lines tot_ctr.
loop at int_edidd.
move int_edidd-segnam to segname.
clear msg.
concatenate 'Reading segment ' segname
into msg separated by space.
if tot_ctr <> 0.
ctr = ( 100 * sy-tabix ) / tot_ctr.
endif.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = ctr
TEXT = msg.
add 1 to seg_repeats.
clear tmp_str2.
if int_edidd-segnam <> prev_segname.
seg_repeats = 1.
clear: pe_seg_header, pt_fields2, pt_fvalues2.
refresh: pt_fields2, pt_fvalues2.
CALL FUNCTION 'SEGMENT_READ_COMPLETE'
EXPORTING
PI_SEGTYP = segname
PI_RELEASE = sap_rel
PI_VERSION = pi_ver
IMPORTING
PE_HEADER = pe_seg_header
TABLES
PT_FIELDS = pt_fields2
PT_FVALUES = pt_fvalues2
EXCEPTIONS
SEGMENT_UNKNOWN = 1
SEGMENT_STRUCTURE_UNKNOWN = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
prev_segname = int_edidd-segnam.
endif.
read table idoc_struct into idoc_struct_wa with key
segment_type = int_edidd-segnam.
if sy-subrc = 0.
IF IDOC_STRUCT_WA-SYNTAX_ATTRIB-MUSTFL = 'X'.
TMP_STR = 'Mandatory'. ""Mandatory
ELSE.
TMP_STR = 'Optional'. ""Optional
ENDIF.
if IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-QUALIFIER = 'X'.
tmp_str3 = 'Qualified'.
else.
tmp_str3 = 'Non-Qualified'.
endif.
shift IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
left deleting leading '0'.
move seg_repeats to tmp_str2.
condense: IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX, tmp_str2.
concatenate tmp_str2 'of' IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
into tmp_str2 separated by space.
write :/ IDOC_STRUCT_wa-SEGMENT_TYPE,
tmp_str,
TMP_STR3,
tmp_str2,
IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL,
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast,
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP.
if d_excel = 'X'.
concatenate 'Segment Name' tab_cr
'Mand / Opt ' tab_cr
'Qual / non-Qual' tab_cr
'Seq of Max' tab_cr
'Level' tab_cr
'Owner' tab_cr
'Description'
into excel_tab.
append excel_tab.
concatenate IDOC_STRUCT_wa-SEGMENT_TYPE tab_cr
tmp_str tab_cr
TMP_STR3 tab_cr
tmp_str2 tab_cr
IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL tab_cr
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast tab_cr
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP
into excel_tab.
append excel_tab.
concatenate tab_cr
'Field Nma' tab_cr
'Type' tab_cr
'Length' tab_cr
'Byte From' tab_cr
'Byte To' tab_cr
'Description' tab_cr
'Value' tab_cr
'Qualifier Meaning'
into excel_tab.
append excel_tab.
endif.
endif.
sort pt_fields2 by field_pos.
byte_first = 0.
loop at pt_fields2.
clear: field_val.
byte_last = pt_fields2-EXTLEN.
write int_edidd-sdata+byte_first(byte_last) to
field_val left-justified.
shift pt_fields2-EXTLEN left deleting leading '0'.
shift pt_fields2-byte_first left deleting leading '0'.
shift pt_fields2-byte_last left deleting leading '0'.
write:/ ' ', pt_fields2-fieldname,
pt_fields2-datatype,
pt_fields2-EXTLEN,
pt_fields2-byte_first ,
pt_fields2-byte_last,
pt_fields2-descrp,
field_val.
read table pt_fvalues2 with key fieldname = pt_fields2-fieldname
fldvalue_l = field_val.
add byte_last to byte_first.
if sy-subrc = 0.
write : pt_fvalues2-descrp.
else.
clear pt_fvalues2-descrp.
endif.
if d_excel = 'X'.
concatenate tab_cr pt_fields2-fieldname tab_cr
pt_fields2-datatype tab_cr
pt_fields2-EXTLEN tab_cr
pt_fields2-byte_first tab_cr
pt_fields2-byte_last tab_cr
pt_fields2-descrp tab_cr
field_val tab_cr
pt_fvalues2-descrp
into excel_tab.
append excel_tab.
endif.
endloop.
endloop.
ENDFORM. "" display_data_records
FORM read_idoc_structure.
data: idoctype type LEDID_IDOCTYPE.
if not idoc_control-cimtyp is initial.
STRUCT_TYPE = 'E'. ""Extended
idoctype = idoc_control-cimtyp.
else.
STRUCT_TYPE = 'B'. ""Basic
idoctype = idoc_control-idoctp.
endif.
CALL FUNCTION 'IDOC_TYPE_COMPLETE_READ'
EXPORTING
RELEASE = sap_rel
STRUCT_TYPE = STRUCT_TYPE
IDOCTYPE = idoctype
VERSION = pi_ver
IMPORTING
IDOC_TYPE = idoctype
TABLES
IDOC_STRUCT = idoc_struct
SEGMENTS = segments
SEGMENT_STRUCT = segment_struct
EXCEPTIONS
IDOCTYPE_UNKNOWN = 1
IDOCSTRUCT_UNKNOWN = 2
SEGMENT_DATA_MISSING = 3
ILLEGAL_STRUCT_TYPE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "" read_idoc_structure
FORM download_to_excel.
data: name like RLGRAP-FILENAME.
shift docnum left deleting leading '0'.
concatenate docnum '-' idoc_control-idoctp '.xls'
into name.
CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
EXPORTING
DATA_NAME = name
DATA_TYPE = 'ASC'
WAIT = ' '
TABLES
DATA_TAB = excel_tab
EXCEPTIONS
NO_BATCH = 1
EXCEL_NOT_INSTALLED = 2
WRONG_VERSION = 3
INTERNAL_ERROR = 4
INVALID_TYPE = 5
CANCELLED = 6
DOWNLOAD_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "" download_to_excel
reward point if helpful.
thanks
mrutyun^ -
How to uplaod multiple excel sheets in a program
Hi gurus,
Can anyone suggest me
how to upload multiple excel sheets in program.( not in OOPS)
my excel sheets has 5 sheets like sheet1, sheet2, sheet3 ....like this..
Thanks & Regards
kalyan.swc_container it_event_container.
swc_create_container it_event_container.
CALL FUNCTION 'SWW_WI_CONTAINER_READ'
EXPORTING
wi_id = wd_id
TABLES
wi_container = it_event_container
EXCEPTIONS
container_does_not_exist = 1
read_failed = 2
OTHERS = 3.
if sy-subrc = 0.
READ TABLE it_event_container WITH KEY element = 'name of your workflow container element'.
IF sy-subrc = 0.
w_variable= it_event_container-value.
ENDIF.
endif.
Regards
Kedar
Maybe you are looking for
-
Testing JMS content conversion
Hi Experts, I have a scenario MQ-->PI--ECC. MQ sends a flat file and there is JMS content conversion used in sender JMS channel. On MQ side channels are not yet setup. Now I need to test if JMS content conversion is working properly. I cannot test by
-
Old mouse broke, How do I pair a new magic mouse?
The magic mouse that came with the desktop broke, so I bought a new 1, but now I have now idea how to pair it with the computer. I checked the page that explains how to do it but I got no other mouse to click here and there like it says, so what do I
-
Hey Guys, One of the users is having an error when try to open Excel files attached from MS Outlook emails. Apparently, the preview window on the bottom become blank and she can't manage to go through the spreadsheet. I have tried the basic things li
-
Not Enough Memory or Something Wrong with Printer error
My Epson 820 printer works fine and I can print a nozzel check pattern from the printer utility software. However, I can't print from any of my software. I keep getting the error "Something Wrong with Printer" or from some software I get "Not Enough
-
Help with mysql URGENT!!
i get the error.... warning: supplied argument is not a valid MySQL result resource in /var/www/html/php/db1.php on line 18 line 18 being.... while ($row = mysql_fetch_row($resultID) code for printing data is here none of my data prints PLEASE HELP M