V - Lookup in Excel sheet?
Hi ,
How to do V-Lookup in Excel sheet.
My requirement is: I have Partner data in one excel tab in EXCELSHEET with lagacyCustomernumber, and in same excel sheet, i have one more tab i.e Sales data with SAP custemore numbers. So now I would like to do the V-LOOKUP in partner data tab for reference of SAP customernumber in partener data.
please help me.
Thanks,
Coti
Hi,
In excel go to 'Insert' Option and select 'Function" > Lookup & Reference> VLOOKUP
Then you will have a pop-up asking for below mention values.
Lookup_value The value to search in the first column of the table array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.). Lookup_value can be a value or a reference. If lookup_value is smaller than the smallest value in the first column of table_array, VLOOKUP returns the #N/A error value.
Table_array Two or more columns of data. Use a reference to a range or a range name. The values in the first column of table_array are the values searched by lookup_value. These values can be text, numbers, or logical values. Uppercase and lowercase text are equivalent.
Col_index_num The column number in table_array from which the matching value must be returned. A col_index_num of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on. If col_index_num is:
Less than 1, VLOOKUP returns the #VALUE! error value.
Greater than the number of columns in table_array, VLOOKUP returns the #REF! error value.
Range_lookup A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match:
If TRUE or omitted, an exact or approximate match is returned. If an exact match is not found, the next largest value that is less than lookup_value is returned.
The values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP may not give the correct value. You can put the values in ascending order by choosing the Sort command from the Data menu and selecting Ascending. For more information, see Default sort orders.
If FALSE, VLOOKUP will only find an exact match. In this case, the values in the first column of table_array do not need to be sorted. If there are two or more values in the first column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, the error value #N/A is returned.
Let me know if you have any problem.
Cheers,
Rc
Similar Messages
-
Error while sending excel sheet as attachment to Mail Receiver
Hi everyone,
I am facing the below error when I am trying to send data to Mail receiver adapter. The attachment is excel sheet.
Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Object not found in lookup of MessageTransformBean.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MessageTransformBean..
I don't understand where the problem is. This has been running since long time and last month we have changed our web dispatcher details. I hope everything is fine. But not sure the root cause for this issue.
Please help me in resolving this.
Thank you.
Regards
Bhanu T.Check if this helps: MessageTransformBean module
Confirm that you have configured the MessagetransformationBean properly.
Are you trying to convert some payload into Excel and send it as an attachment in the Mail CC? If yes, then I hope that you have included the correct Content_type value.
Check this for more info on Content_type: /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
Regards,
Abhishek. -
Downloading the List of iViews in a Excel Sheet in Sorted Order.
Hi
I have a requirement of getting a list of all the iviews that are created in a excel sheet in a sorted manner.
Can anyone help how to get a list in a excel sheet in a sorted manner..
Regards
JMHi John,
Here is the code to get the list of all iviews..
List iviewslist = null;
try
Hashtable map = new Hashtable();
map.put(IPcdContext.SECURITY_PRINCIPAL,request.getUser());
map.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
map.put(Constants.REQUESTED_ASPECT,PcmConstants.ASPECT_SEMANTICS);
InitialContext ctx = null;
DirContext dirctx;
ctx = new InitialContext(map);
dirctx = (DirContext)ctx.lookup("pcd:portal_content/");
PcdSearchControls pcd_serachcontrol = new PcdSearchControls();
pcd_serachcontrol.setReturningObjFlag(false);
pcd_serachcontrol.setSearchScope(pcd_serachcontrol.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
dirctx.addToEnvironment(Constants.APPLY_ASPECT_TO_CONTEXTS,Constants.APPLY_ASPECT_TO_CONTEXTS);
NamingEnumeration ne = dirctx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview)",pcd_serachcontrol);
iviewslist = new ArrayList();
while(ne.hasMoreElements())
IPcdSearchResult searchresult =(IPcdSearchResult)ne.next();
String loc = "pcd:portal_content/"+searchresult.getName();
iviewslist.add(loc);
response.write(loc+"<br>");
catch (Exception e) {
response.write(e.toString()); -
Encountering problems with exporting complex excel sheets to SWF
Please help me with this problem:
I have a complex Excel sheet, with functions like VERT.LOOKUP, INDEX etc. This should work in Xcelsius, but I have problems when having a preview in SWF. In the Xcelsius Present 2008 drawing window, all buttons work perfectly, but when I preview it, all outcomes are gone (buttons do work).
When removing VERT.LOOKUP and table shortnames (see example) it sometimes does work. So my guess is that SWF does not support VERT.LOOKUP and/or table shortnames. Does anyone know anything about this problem and maybe can help me? I use the 30-day trial version of Xcelsius Present.
Table example:
_______PROD1____PROD2____PROD3
YEAR1___10________20________30
YEAR2___20________15________50
YEAR3___30________10________100
In Excel, when you give names to this table (Insert/Name/Make --> columns & rows), you can get info out of this table with the simple function =YEAR1 PROD2. --> 20.
Thank you very much!Yeah, I know. But VERT.LOOKUP is supported. The strange thing about this is dat Xcelsius is displaying is well when not in the preview mode.
-
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) -
Vendor open items wise ALV Grid Display (FBL1N) report to Excel Sheet
Hi All,
I need vendor wise open items and cleared items in ALV Grid format in excel sheet.
I'm Trying that in T Code FBL1N, After the execution. I had select ALV Grid format like this From the menu bar->Settings-> Switch list.
After that i get ALV Grid format, Then i'm doing export the data to excel sheet. like this From the Menu bar->List->Export->Spread sheet.
That time i'm getting Error Message no. 0K064, Filter criteria, sorting, totals and subtotals are not taken into account.
I want vendor wise sorting totals and subtotals,
How can i over come this Error please let me now.
Thanks,
AmarHi Amar,
Please check the KBA 2083705.
https://websmp230.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3230383337303526
Regards,
Monika -
Unable to download the data perfectly into excel sheet
Hi Frnds,
when i am trying to download the data from the output of a report into excel, some of the records(line items/rows) are getting stored in one of column of the excel sheet. Fog eg: my report outputs 500 line items. In excel after 100 rows the next 5-10 records/rows are storing in one column. so at the end of excel sheet i may not find total 500 records/line items.
Plz suggest me how to handle this.
Thnks,
Pavan*& Report ZETA_EXCEL_DOWNLOAD_CLIPBOARD *
report zeta_excel_download_clipboard .
include ole2incl.
data: w_cell1 type ole2_object,
w_cell2 type ole2_object.
*--- Ole data Declarations
data: h_excel type ole2_object, " Excel object
h_mapl type ole2_object, " list of workbooks
h_map type ole2_object, " workbook
h_zl type ole2_object, " cell
h_f type ole2_object, " font
gs_interior type ole2_object, " Pattern
worksheet type ole2_object,
h_cell type ole2_object,
h_cell1 type ole2_object,
range type ole2_object,
h_sheet2 type ole2_object,
h_sheet3 type ole2_object,
gs_font type ole2_object,
flg_stop(1) type c.
Internal table Declaration
data: begin of t_excel occurs 0,
vkorg(20) type c, "Sales Org
vbtyp(20) type c, "Document Category
auart(20) type c, "Document Type
ernam(20) type c, "Created By
vbeln(20) type c, "Document Number
posnr(20) type c, "Item Number
erdat(20) type c, "Created Date
vdatu(20) type c, "Header Requested Delivery Date
reqdat(20) type c, "Request date
condat(20) type c, "Confirm date
lifsk(20) type c, "Header Block
txt30(30) type c, "Order User Status Description
lifsp(20) type c, "Line Block
dispo(20) type c, "MRP Controller
dsnam(20) type c, "MRP Controller Description
vmsta(20) type c, "Material Sales Status
kunnr(20) type c, "Sold To
cname(35) type c, "Sold To Name
regio(20) type c, "State
cufd(10) type c, "CUD
bstnk(20) type c, "PO#
bsark(20) type c, "Ordering Method
matnr(20) type c, "Material
maktx(35) type c, "Material Description
t200(20) type c, "T200
vtext(20) type c, "T200 Description
matkl(20) type c, "Material Group
zzbomind(7) type c, "BOM Indicator
ostat(20) type c, "Order Status
cmgst(20) type c, "CRD
inco1(20) type c, "Incoterms
oqty(20) type c, "Order Quantity
pqty(20) type c, "Open Quantity
unit(20) type c, "UOM
onet(20) type c, "Order Value
pnet(20) type c, "Open Value
curr(20) type c, "Currency key
so_bezei like tvkbt-bezei,"Sales Office
sg_bezei like tvgrt-bezei,"Sales Group
bname(20) type c, "Ordering Party
contact(20) type c, "Contact Name
telf1(20) type c, "Contact telf1
reqqty(20) type c, "Item Request qty
reqval(20) type c, "Item Request value
conqty(20) type c, "Item Confirm qty
conval(20) type c, "Item Confirm value
zzrev(02) type c, "Revenue recognition acceptance
bezei(20) type c, "Revenue recognition text
vgbel(20) type c, "Reference Order for RETURNS
0008text(255) type c, "Internal Order Comment Text
end of t_excel.
data: t_excel_bckord like t_excel occurs 0 with header line,
t_excel_bcklog like t_excel occurs 0 with header line,
t_excel_blkord like t_excel occurs 0 with header line.
types: data1(1500) type c,
ty type table of data1.
data: it type ty with header line,
it_2 type ty with header line,
it_3 type ty with header line,
rec type sy-tfill,
deli(1) type c,
l_amt(18) type c.
data: begin of hex,
tab type x,
end of hex.
field-symbols: <fs> .
constants cns_09(2) type n value 09.
assign deli to <fs> type 'X'.
hex-tab = cns_09.
<fs> = hex-tab.
data gv_sheet_name(20) type c .
M A C R O Declaration
define ole_check_error.
if &1 ne 0.
message e001(zz) with &1.
exit.
endif.
end-of-definition.
t_excel_bckord-vkorg = 'ABC'.
t_excel_bckord-vbtyp = 'DEF'.
t_excel_bckord-auart = 'GHI'.
t_excel_bckord-ernam = 'JKL'.
t_excel_bckord-vbeln = 'MNO'.
t_excel_bckord-0008text = 'XYZ'.
append t_excel_bckord.
t_excel_bckord-vkorg = 'ABC1'.
t_excel_bckord-vbtyp = 'DEF1'.
t_excel_bckord-auart = 'GHI1'.
t_excel_bckord-ernam = 'JKL1'.
t_excel_bckord-vbeln = 'MNO1'.
t_excel_bckord-0008text = 'XYZ1'.
append t_excel_bckord.
t_excel_bckord-vkorg = 'ABC2'.
t_excel_bckord-vbtyp = 'DEF2'.
t_excel_bckord-auart = 'GHI2'.
t_excel_bckord-ernam = 'JKL2'.
t_excel_bckord-vbeln = 'MNO2'.
t_excel_bckord-0008text = 'XYZ2'.
append t_excel_bckord.
t_excel_bcklog-vkorg = 'ABC'.
t_excel_bcklog-vbtyp = 'DEF'.
t_excel_bcklog-auart = 'GHI'.
t_excel_bcklog-ernam = 'JKL'.
t_excel_bcklog-vbeln = 'MNO'.
t_excel_bcklog-0008text = 'XYZ'.
append t_excel_bcklog.
t_excel_bcklog-vkorg = 'ABC1'.
t_excel_bcklog-vbtyp = 'DEF1'.
t_excel_bcklog-auart = 'GHI1'.
t_excel_bcklog-ernam = 'JKL1'.
t_excel_bcklog-vbeln = 'MNO1'.
t_excel_bcklog-0008text = 'XYZ1'.
append t_excel_bcklog.
t_excel_bcklog-vkorg = 'ABC2'.
t_excel_bcklog-vbtyp = 'DEF2'.
t_excel_bcklog-auart = 'GHI2'.
t_excel_bcklog-ernam = 'JKL2'.
t_excel_bcklog-vbeln = 'MNO2'.
t_excel_bcklog-0008text = 'XYZ2'.
append t_excel_bcklog.
t_excel_bcklog-vkorg = 'ABC3'.
t_excel_bcklog-vbtyp = 'DEF3'..
t_excel_bcklog-auart = 'GHI3'.
t_excel_bcklog-ernam = 'JKL3'.
t_excel_bcklog-vbeln = 'MNO3'.
t_excel_bcklog-0008text = 'XYZ3'.
append t_excel_bcklog.
t_excel_blkord-vkorg = 'ABC'.
t_excel_blkord-vbtyp = 'DEF'.
t_excel_blkord-auart = 'GHI'.
t_excel_blkord-ernam = 'JKL'.
t_excel_blkord-vbeln = 'MNO'.
t_excel_blkord-0008text = 'XYZ'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC1'.
t_excel_blkord-vbtyp = 'DEF1'.
t_excel_blkord-auart = 'GHI1'.
t_excel_blkord-ernam = 'JKL1'.
t_excel_blkord-vbeln = 'MNO1'.
t_excel_blkord-0008text = 'XYZ1'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC2'.
t_excel_blkord-vbtyp = 'DEF2'.
t_excel_blkord-auart = 'GHI2'.
t_excel_blkord-ernam = 'JKL2'.
t_excel_blkord-vbeln = 'MNO2'.
t_excel_blkord-0008text = 'XYZ2'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC3'.
t_excel_blkord-vbtyp = 'DEF3'..
t_excel_blkord-auart = 'GHI3'.
t_excel_blkord-ernam = 'JKL3'.
t_excel_blkord-vbeln = 'MNO3'.
t_excel_blkord-0008text = 'XYZ3'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC4'.
t_excel_blkord-vbtyp = 'DEF4'..
t_excel_blkord-auart = 'GHI4'.
t_excel_blkord-ernam = 'JKL4'.
t_excel_blkord-vbeln = 'MNO4'.
t_excel_blkord-0008text = 'XYZ4'.
append t_excel_blkord.
loop at t_excel_bckord.
concatenate
t_excel_bckord-vkorg
t_excel_bckord-vbtyp
t_excel_bckord-auart
t_excel_bckord-ernam
t_excel_bckord-vbeln
t_excel_bckord-posnr
t_excel_bckord-erdat
t_excel_bckord-vdatu
t_excel_bckord-reqdat
t_excel_bckord-condat
t_excel_bckord-lifsk
t_excel_bckord-txt30
t_excel_bckord-lifsp
t_excel_bckord-dispo
t_excel_bckord-dsnam
t_excel_bckord-vmsta
t_excel_bckord-kunnr
t_excel_bckord-cname
t_excel_bckord-regio
t_excel_bckord-cufd
t_excel_bckord-bstnk
t_excel_bckord-bsark
t_excel_bckord-matnr
t_excel_bckord-maktx
t_excel_bckord-t200
t_excel_bckord-vtext
t_excel_bckord-matkl
t_excel_bckord-zzbomind
t_excel_bckord-ostat
t_excel_bckord-cmgst
t_excel_bckord-inco1
t_excel_bckord-oqty
t_excel_bckord-pqty
t_excel_bckord-unit
t_excel_bckord-onet
t_excel_bckord-pnet
t_excel_bckord-curr
t_excel_bckord-so_bezei
t_excel_bckord-sg_bezei
t_excel_bckord-bname
t_excel_bckord-contact
t_excel_bckord-telf1
t_excel_bckord-reqqty
t_excel_bckord-reqval
t_excel_bckord-conqty
t_excel_bckord-conval
t_excel_bckord-zzrev
t_excel_bckord-bezei
t_excel_bckord-vgbel
t_excel_bckord-0008text
into it
separated by deli.
append it.
clear it.
endloop.
loop at t_excel_bcklog.
concatenate
t_excel_bcklog-vkorg
t_excel_bcklog-vbtyp
t_excel_bcklog-auart
t_excel_bcklog-ernam
t_excel_bcklog-vbeln
t_excel_bcklog-posnr
t_excel_bcklog-erdat
t_excel_bcklog-vdatu
t_excel_bcklog-reqdat
t_excel_bcklog-condat
t_excel_bcklog-lifsk
t_excel_bcklog-txt30
t_excel_bcklog-lifsp
t_excel_bcklog-dispo
t_excel_bcklog-dsnam
t_excel_bcklog-vmsta
t_excel_bcklog-kunnr
t_excel_bcklog-cname
t_excel_bcklog-regio
t_excel_bcklog-cufd
t_excel_bcklog-bstnk
t_excel_bcklog-bsark
t_excel_bcklog-matnr
t_excel_bcklog-maktx
t_excel_bcklog-t200
t_excel_bcklog-vtext
t_excel_bcklog-matkl
t_excel_bcklog-zzbomind
t_excel_bcklog-ostat
t_excel_bcklog-cmgst
t_excel_bcklog-inco1
t_excel_bcklog-oqty
t_excel_bcklog-pqty
t_excel_bcklog-unit
t_excel_bcklog-onet
t_excel_bcklog-pnet
t_excel_bcklog-curr
t_excel_bcklog-so_bezei
t_excel_bcklog-sg_bezei
t_excel_bcklog-bname
t_excel_bcklog-contact
t_excel_bcklog-telf1
t_excel_bcklog-reqqty
t_excel_bcklog-reqval
t_excel_bcklog-conqty
t_excel_bcklog-conval
t_excel_bcklog-zzrev
t_excel_bcklog-bezei
t_excel_bcklog-vgbel
t_excel_bcklog-0008text
into it_2
separated by deli.
append it_2.
clear it_2.
endloop.
loop at t_excel_blkord.
concatenate
t_excel_blkord-vkorg
t_excel_blkord-vbtyp
t_excel_blkord-auart
t_excel_blkord-ernam
t_excel_blkord-vbeln
t_excel_blkord-posnr
t_excel_blkord-erdat
t_excel_blkord-vdatu
t_excel_blkord-reqdat
t_excel_blkord-condat
t_excel_blkord-lifsk
t_excel_blkord-txt30
t_excel_blkord-lifsp
t_excel_blkord-dispo
t_excel_blkord-dsnam
t_excel_blkord-vmsta
t_excel_blkord-kunnr
t_excel_blkord-cname
t_excel_blkord-regio
t_excel_blkord-cufd
t_excel_blkord-bstnk
t_excel_blkord-bsark
t_excel_blkord-matnr
t_excel_blkord-maktx
t_excel_blkord-t200
t_excel_blkord-vtext
t_excel_blkord-matkl
t_excel_blkord-zzbomind
t_excel_blkord-ostat
t_excel_blkord-cmgst
t_excel_blkord-inco1
t_excel_blkord-oqty
t_excel_blkord-pqty
t_excel_blkord-unit
t_excel_blkord-onet
t_excel_blkord-pnet
t_excel_blkord-curr
t_excel_blkord-so_bezei
t_excel_blkord-sg_bezei
t_excel_blkord-bname
t_excel_blkord-contact
t_excel_blkord-telf1
t_excel_blkord-reqqty
t_excel_blkord-reqval
t_excel_blkord-conqty
t_excel_blkord-conval
t_excel_blkord-zzrev
t_excel_blkord-bezei
t_excel_blkord-vgbel
t_excel_blkord-0008text
into it_3
separated by deli.
append it_3.
clear it_3.
endloop.
if h_excel-header = space or h_excel-handle = -1.
start Excel
create object h_excel 'EXCEL.APPLICATION'.
endif.
PERFORM err_hdl.
*--- get list of workbooks, initially empty
call method of h_excel 'Workbooks' = h_mapl.
PERFORM err_hdl.
set property of h_excel 'Visible' = 1.
add a new workbook
call method of h_mapl 'Add' = h_map.
PERFORM err_hdl.
*GV_SHEET_NAME = '1st SHEET'.
gv_sheet_name = 'Back Orders'.
get property of h_excel 'ACTIVESHEET' = worksheet.
set property of worksheet 'Name' = gv_sheet_name .
*--Formatting the area of additional data 1 and doing the BOLD
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 50.
call method of h_excel 'Range' = h_cell
exporting
#1 = w_cell1
#2 = w_cell2.
*CALL METHOD OF gs_cells 'Select' .
get property of h_cell 'Font' = gs_font .
set property of gs_font 'Bold' = 1 .
data l_rc type i.
call method cl_gui_frontend_services=>clipboard_export
importing
data = it[]
changing
rc = l_rc
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 1.
PERFORM err_hdl.
call method of h_excel 'Range' = range
exporting
#1 = w_cell1
#2 = w_cell2.
call method of range 'Select'.
PERFORM err_hdl.
call method of worksheet 'Paste'.
PERFORM err_hdl.
CALL METHOD OF h_excel 'QUIT'.
*GV_SHEET_NAME = '2ND SHEET'.
gv_sheet_name = 'Backlog'.
get property of h_excel 'Sheets' = h_sheet2 .
call method of h_sheet2 'Add' = h_map.
set property of h_map 'Name' = gv_sheet_name .
get property of h_excel 'ACTIVESHEET' = worksheet.
*--Formatting the area of additional data 1 and doing the BOLD
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 50.
call method of h_excel 'Range' = h_cell
exporting
#1 = w_cell1
#2 = w_cell2.
get property of h_cell 'Font' = gs_font .
set property of gs_font 'Bold' = 1 .
call method cl_gui_frontend_services=>clipboard_export
importing
data = it_2[]
changing
rc = l_rc
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 1.
PERFORM err_hdl.
call method of h_excel 'Range' = range
exporting
#1 = w_cell1
#2 = w_cell2.
call method of range 'Select'.
PERFORM err_hdl.
call method of worksheet 'Paste'.
*GV_SHEET_NAME = '3rd SHEET'.
gv_sheet_name = 'Blocked Orders'.
get property of h_excel 'Sheets' = h_sheet3 .
call method of h_sheet3 'Add' = h_map.
set property of h_map 'Name' = gv_sheet_name .
get property of h_excel 'ACTIVESHEET' = worksheet.
*--Formatting the area of additional data 1 and doing the BOLD
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 50.
call method of h_excel 'Range' = h_cell
exporting
#1 = w_cell1
#2 = w_cell2.
get property of h_cell 'Font' = gs_font .
set property of gs_font 'Bold' = 1 .
call method cl_gui_frontend_services=>clipboard_export
importing
data = it_3[]
changing
rc = l_rc
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 1.
PERFORM err_hdl.
call method of h_excel 'Range' = range
exporting
#1 = w_cell1
#2 = w_cell2.
call method of range 'Select'.
PERFORM err_hdl.
call method of worksheet 'Paste'.
*--- disconnect from Excel
free object h_zl.
free object h_mapl.
free object h_map.
free object h_excel. -
Unable to display double values in Excel sheet using JExcel API
Hi
I am writing code to generate report in the form of Excel Sheet using JExcel API.
Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
Any kind of reply might help me lot.
Thank U.If you enable the submit zero option, it still happens? This is a new feature on the display tabl
#NumericZero Enhancements
To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
· Excel formatting for the cell is retained.
· All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
· This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
1. (Highest) Metadata errors
2. #No access
3. #Invalid/Meaningless
4. #No data\Missing -
Header and footer in excel sheet (ole object)
How can we generate footer and header in an excel sheet with ole object ?
Thankshi brian,
Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT
*Title : Excel Uploading
TYPES: BEGIN OF t_datatab,
col1(25) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
col4(30) TYPE c,
col5(30) TYPE c,
col6(30) TYPE c,
col7(30) TYPE c,
col8(30) TYPE c,
col9(30) TYPE c,
col10(30) TYPE c,
col11(30) TYPE c,
END OF t_datatab.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
wa_datatab TYPE t_datatab.
Data : p_table type t_datatab occurs 0 with header line.
DATA : gd_scol TYPE i VALUE '1',
gd_srow TYPE i VALUE '1',
gd_ecol TYPE i VALUE '256',
gd_erow TYPE i VALUE '65536'.
DATA: it_tab TYPE filetable,
gd_subrc TYPE i.
field-symbols : <fs>.
*Selection screen definition
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_file LIKE rlgrap-filename
DEFAULT 'c:\test.xls' OBLIGATORY. " File Name
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
REFRESH: it_tab.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select File'
default_filename = '*.xls'
multiselection = ' '
CHANGING
file_table = it_tab
rc = gd_subrc.
LOOP AT it_tab INTO p_file.
so_fpath-sign = 'I'.
so_fpath-option = 'EQ'.
append so_fpath.
ENDLOOP.
START-OF-SELECTION.
PERFORM upload_excel_file TABLES it_datatab
USING p_file
gd_scol
gd_srow
gd_ecol
gd_erow.
END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3,
wa_datatab-col4,
wa_datatab-col5,
wa_datatab-col6,
wa_datatab-col7,
wa_datatab-col8,
wa_datatab-col9,
wa_datatab-col10,
wa_datatab-col11.
ENDLOOP.
*& Form UPLOAD_EXCEL_FILE
upload excel spreadsheet into internal table
-->P_TABLE Table to return excel data into
-->P_FILE file name and path
-->P_SCOL start column
-->P_SROW start row
-->P_ECOL end column
-->P_EROW end row
FORM upload_excel_file TABLES p_table
USING p_file
p_scol
p_srow
p_ecol
p_erow.
DATA : lt_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.
Has the following format:
Row number | Colum Number | Value
i.e. 1 1 Name1
2 1 Joe
DATA : ld_index TYPE i.
Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_file
i_begin_col = p_scol
i_begin_row = p_srow
i_end_col = p_ecol
i_end_row = p_erow
TABLES
intern = LT_INTERN
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'Error Uploading file'.
EXIT.
ENDIF.
IF lt_intern[] IS INITIAL.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'No Data Uploaded'.
EXIT.
ELSE.
SORT lt_intern BY row col.
LOOP AT lt_intern.
MOVE lt_intern-col TO ld_index.
assign component ld_index of structure
p_table to <fs>.
move : lt_intern-value to <fs>.
MOVE lt_intern-value TO p_table.
AT END OF row.
APPEND p_table.
CLEAR p_table.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. "UPLOAD_EXCEL_FILE
thanks
abdul -
Upload data from excel sheet into md61
Hi Gurus,
Can anybody please tell me the solution like how to upload the data from excel sheet into the MD61
if u suggest me to write an ABAP code then its fine or any other way would be great
and can u also send me the abap code i would be thankful to allHi,
I can be done in 2 ways.
1. Using LSMW you can upload your MD61 demand thru Excel sheet.
2. You can use BDC to upload the demand from Excel. For this you need to take help from the ABAP. You need to record the macro usinf SHDB and the table maintenance will be taken care by the developer.
For LSMW you need not depend on your developer, as a functional consultant you can do it yourself.
Regards,
V. Suresh -
Upload in Excel Sheet for Mid Year Go Live
Hi Friends,
How to upload T558 B & C tables in Excel Sheet for Mid Year Go Live.
Awaiting for your reply
Regards
Praveen PHi,
t558c template here between postingdate and amount two blank tab is there
client pernr period country wagetype postingdate amount
t558b template here between period and posting date two blank tab is there
client pernr period postingdate periodparameter year period monthstartrdate enddate month
and the date format is YYYYMMDD
Edited by: BALAPANI on Oct 13, 2009 12:19 PM -
Excel sheet with multiple tabs to be sent as email
Hi Experts,
I have a requirement to generate an Excel sheet with multiple tabs to be sent as email to a distribution list.
Please help if you have any ideas on the same.
Thanks,
Preema[http://wiki.sdn.sap.com/wiki/display/ABAP/ToGetFieldDetailsSavedinVariantLayout|http://wiki.sdn.sap.com/wiki/display/ABAP/ToGetFieldDetailsSavedinVariantLayout]
with this we can get the modified field catalog based on layout variant
without calling alv output function modules
Thanks! SDN. -
Hi all,
I have an excel sheet with 2 spread sheets. 1 hidden and other visible.
1) How to read the excel so that the hidden fields dont come into the internal table in which the data is read?
2) when the data is read from the visible tab of the excel sheet, data from hidden tab is also getting added in the internal table.
How to avoid it?
Useful answers will be rewarded with points.
please help!!!Hi,
If you have 2 tabs in your excel sheet. Open one tab which you want to process save it. Now it should be process active tab only.
thanks,
Sriram. -
Hi ,
i have attached an excel sheet with wbs after that when i change contents or write something and when i saved it the sheet is not changing . i have unprotectd the sheed ,
can anybody clear me what is the problem
Thanks in advance
Regards
Rama Shanker SharmaHi,
Would you please share your experience to solve this problem?
Recently, we got the same problem.
Thanks ahead,
Ecco -
The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0
The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0. We have already installed an add-in (Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists) that was supposed
to help the synchronization of excel to Sharepoint, but it did not work. We would like to synchronize information about a calendar from excel to Sharepoint 3.0, so every time a change is made in excel it automatically updates in Sharepoint.ootb, changes in excel don't sync with a SharePoint list, the other way around is possible.
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com
Maybe you are looking for
-
Empty report returned from WEBI and Crystal report when using external hier
Hi, WEBI and Crystal report build from BEX query returned empty report when we used external hierarchy 0PROFIT_CTR. In BEX we don't have any problems with it. No authority check is perfomed on the hierarchy when we start the report in WEBI/Crystal.
-
Can the contact data base be overwritten by an IPad on ITunes sync?
We have two IPad minis and two IPhone5s. My wife has updated and purged msny of the hundreds of contacts on he IPad. We have one user ID. I sync her IPad and her iphone on my Mac Book Pro where the Contact file resides. How do I overide with her I
-
Can you connect a iPad USB port into a TV and show the videos you play?
Can you sue the USB to plug into a TV and show the videos?
-
How to query PO by DFF... In Purchase Order form i have one DFF named PO Priority, i want to query my PO's as priority wise. like how many PO are URGENT PRIORITY. thank in advance
-
When is Firefox Mobile getting mp3 and aac html5 support?
I want to be able to use Firefox for Android to listen to music through Grooveshark's html5 website. From what information I've been able to gather Firefox for Android must still only have ogg hmtl5 support and I don't want to have to use Chrome or t