How to Read Excel Work Sheet Name
Hi
I am try to read Excel sheet from SAP B one. any one tell me how to get the Sheet name through Programmatically in C#....
Senthil Kumar
There are two ways you can do that:
#1
A - put the budget.htm file on your server where you can link to it.
B - on the web page add an HTML snippet with the folloiwng code:
<iframe height="XXXpx" allowTransparency="true" frameborder="0" scrolling="no" style="width:XXXpx;border:none" src="URL TO BUDGET.HTM FILE"></iframe>
Set the width and height, in pixels, so that the snippet will display the entire table.
#2
A - open the budget.htm file with a text editor and copy all of the code.
B - add an HTML snippet to the iWeb page and paste the code into the snippet.
An example of both methods are near the bottom of this demo page: Tables.
With method 1, you can edit or change the table without having to use iWeb. Just replace the budget.htm file with the new and improved version on the server. That will automatically be seen in the published site.
OT
Message was edited by: Old Toad
Similar Messages
-
How to get excel work sheet into iweb
I searched for the answer to this and found a post that said save it as a web page and insert as a snippet.
Well its not quite that simple. It's a very small budget in excel, about 25 lines 5 columns. I saved as a web page to the desk top and I got one file called budget.htm but when I open it isn't any html that I can insert as a snippet. It is just an excel worksheet.
It also saved a folder called budget_files and in that are 7 files: one is filelist.xml, then sheet001.htm, sheet002.htm, sheet003.htm, sheet004.htm, stylesheet.css and tabstrip.htm
Now there were other sheets in the excel file that i don't want so maybe its sheet001.htm that is the file however when I click on that to try and open it so I can copy the html and insert it to html snippet in iweb a safari page opens up and says it can find the address. Huh? Please tell me what I'm doing wrong?
many thanks,
Susan
iweb 3.0.2There are two ways you can do that:
#1
A - put the budget.htm file on your server where you can link to it.
B - on the web page add an HTML snippet with the folloiwng code:
<iframe height="XXXpx" allowTransparency="true" frameborder="0" scrolling="no" style="width:XXXpx;border:none" src="URL TO BUDGET.HTM FILE"></iframe>
Set the width and height, in pixels, so that the snippet will display the entire table.
#2
A - open the budget.htm file with a text editor and copy all of the code.
B - add an HTML snippet to the iWeb page and paste the code into the snippet.
An example of both methods are near the bottom of this demo page: Tables.
With method 1, you can edit or change the table without having to use iWeb. Just replace the budget.htm file with the new and improved version on the server. That will automatically be seen in the published site.
OT
Message was edited by: Old Toad -
How to read Excel file in flex
Hi,
I am new to Adobe flex and i dont know how to read Excel in flex and i need coding for that. So anybody help me...
thanks in advance...Hi
You can read and parse XLS files (only works with xls-files) with urlloader and a ZIP-lib that can read zip-files.
public function loadXLS(url:String):void
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
urlLoader.addEventListener(Event.COMPLETE, onLoadComplete);
urlLoader.load(new URLRequest(url));
private function onLoadComplete(even:Event):void
urlLoader.removeEventListener(Event.COMPLETE, onLoadComplete);
model.sheetsDict = new Dictionary();
var zipFile:ZipFile = new ZipFile(urlLoader.data);
for(var i:int = 0; i < zipFile.entries.length; i++)
var entry:ZipEntry = zipFile.entries[i];
var data:ByteArray = zipFile.getInput(entry);
if(useFile(entry.name, "/sheet([^$]+)"))
model.sheetsDict[entry.name.split("xl/")[1]] = new XML(data.toString());
else if( useFile(entry.name, "/sharedStrings.xml") )
model.sharedStrings = new XML(data.toString());
else if( useFile(entry.name, "/workbook.xml$") )
model.workbook = new XML(data.toString());
else if( useFile(entry.name, "/workbook.xml.rels") )
model.rels = new XML(data.toString());
trace(model.sharedStrings)
to read the xml properly you have to use namespaces in the reader-class
namespace ns1 = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
use namespace ns1;
namespace ns2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
use namespace ns2;
namespace ns3 = "http://schemas.openxmlformats.org/markup-compatibility/2006";
use namespace ns3;
namespace ns4 = "urn:schemas-microsoft-com:mac:vml";
use namespace ns4;
namespace ns5 = "http://schemas.openxmlformats.org/package/2006/relationships";
use namespace ns5;
//Olof -
How to read a spread sheet ( .xls ) file using a pl/sql procedure or func
Hello All,
Is it possible to read a spread sheet using Oracle pl.sql .
I know their is a util package that is read a file but how to read a spread sheet ... ?
thanks
kumarhi kumar,
Here is an example of how i read an excel file
DECLARE
l_start_file_name varchar2(50) := 'invoice_excel_c';
l_end_file_name varchar2(50) := '.csv';
l_file_name varchar2(100);
l_sql varchar(32767);
refresh_cdc varchar2(5) := '00304';
begin
l_file_name := l_start_file_name||REFRESH_CDC||l_end_file_name;
l_sql :=
'create table exter_invoice_excel '||
'( '||
'Product_name varchar2(255), '||
'Net_Sales Number, '||
'Net_Adjustments Number, '||
'Cancels_Count Number, '||
'Cancels_Amount Number, '||
'Cashes_Count Number, '||
'Cashes_Amount Number, '||
'Claims_Count Number, '||
'Claims_Amount Number, '||
'Returns_Count Number, '||
'Returns_Amount Number, '||
'Free_Prize_Count Number, '||
'Free_Prize_Amount Number, '||
'Free_Promo_Count Number, '||
'Free_Promo_Amount Number, '||
'Promo_Credit_Count Number, '||
'Promo_Credit_Amount Number, '||
'Return_Commission Number, '||
'Net_Discounts Number, '||
'Total_Fees Number, '||
'Sales_Commission Number, '||
'Cash_Commission Number, '||
'Tkt_Charge Number, '||
'Subscription_Commission Number, '||
'Interim_Sweeps Number, '||
'Net_Due Number, '||
'Retailer_id Number, '||
'Retailer_Name varchar2(255) '||
') '||
'ORGANIZATION EXTERNAL ( '||
' TYPE oracle_loader '||
' DEFAULT DIRECTORY GTECHFILES '||
' ACCESS PARAMETERS ( '||
' RECORDS DELIMITED BY NEWLINE '||
' CHARACTERSET WE8MSWIN1252 '||
' BADFILE ''invoice_excel.bad'' '||
' DISCARDFILE ''invoice_excel.dis'' '||
' LOGFILE ''invoice_excel.log'' '||
' FIELDS TERMINATED BY '','' RTRIM '||
' MISSING FIELD VALUES ARE NULL '||
' ) '||
' LOCATION ('''||l_file_name||''') '||
' ) '||
'PARALLEL '||
'REJECT LIMIT UNLIMITED ';
execute immediate l_sql;
l_sql:= 'INSERT INTO INVOICE_EXCEL_TEMP '||
' ( Product_name , '||
' Net_Sales , '||
' Net_Adjustments , '||
' Cancels_Count , '||
' Cancels_Amount , '||
' Cashes_Count , '||
' Cashes_Amount , '||
' Claims_Count , '||
' Claims_Amount , '||
' Returns_Count , '||
' Returns_Amount , '||
' Free_Prize_Count , '||
' Free_Prize_Amount , '||
' Free_Promo_Count , '||
' Free_Promo_Amount , '||
' Promo_Credit_Count , '||
' Promo_Credit_Amount , '||
' Return_Commission , '||
' Net_Discounts , '||
' Total_Fees , '||
' Sales_Commission , '||
' Cash_Commission , '||
' Tkt_Charge , '||
' Subscription_Commission , '||
' Interim_Sweeps , '||
' Net_Due , '||
' Retailer_id , '||
' Retailer_Name , '||
' SOURCE , '||
' INSERTED_DATE , '||
' CDC , '||
' UPLOADED '||
') '||
' select '||
' ltrim(rtrim(product_name)) , '||
' Net_Sales , '||
' Net_Adjustments , '||
' Cancels_Count , '||
' Cancels_Amount , '||
' Cashes_Count , '||
' Cashes_Amount , '||
' Claims_Count , '||
' Claims_Amount , '||
' Returns_Count , '||
' Returns_Amount , '||
' Free_Prize_Count , '||
' Free_Prize_Amount , '||
' Free_Promo_Count , '||
' Free_Promo_Amount , '||
' Promo_Credit_Count , '||
' Promo_Credit_Amount , '||
' Return_Commission , '||
' Net_Discounts , '||
' Total_Fees , '||
' Sales_Commission , '||
' Cash_Commission , '||
' Tkt_Charge , '||
' Subscription_Commission , '||
' Interim_Sweeps , '||
' Net_Due , '||
' Retailer_id , '||
' Retailer_Name , '||
' '''||l_file_name ||''', '||
' sysdate , '||
' '''|| REFRESH_CDC ||''', '||
'''N''' ||
'FROM '||
'exter_invoice_excel '||
'WHERE retailer_id is not null and ltrim(rtrim(product_name)) in (''Loto'',''Inst Tk'')';
execute immediate l_sql;
l_sql :='drop table exter_invoice_excel';
execute immediate l_sql;
exception
when others then
rollback;
l_sql :='drop table exter_invoice_excel';
execute immediate l_sql;
debug_message('INVOICE_EXCEL_UPLOAD/'||REFRESH_CDC,'Unexpected Error '||sqlerrm);
END;
--truncate table invoice_excel_tempjust go through the code, it would help u for sure
cheers -
How to read excel file in document library and store excel content in sql table
Hello,
Can anyone help me how to read the excel file present in document library and store the content inside excel into sql table?
Please let me know the ways to acheive this. Feel free to give your suggestions.
Thanks,
Cool DeveloperHi!
this code i have written becuase i donot find any soltions on net for this , u can try with this . :)
System.Data.OleDb.
OleDbConnection ExcelConnection = null;
FileMode fileMode;
string filePath = ConfigurationManager.AppSettings["TempLoaction"] + "\\" + fileName;
using (SPSite _site = new SPSite(SPContext.Current.Web.Url))
using (SPWeb _web = _site.OpenWeb())
string docLibrary = ConfigurationManager.AppSettings["DocumentLibrary"];
SPFile _file = _web.GetFile("/" + docLibrary + "/" + fileName);
fileMode =
FileMode.Create;
byte[] byteArray = _file.OpenBinary();
MemoryStream dataStream = new MemoryStream(byteArray);
Stream stream = dataStream;
using (FileStream fs = File.Open(filePath, fileMode))
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
fs.Write(buffer, 0, bytesRead);
fs.Close();
//Create the Connection String
try
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source ='"
+ filePath + "'; Extended Properties=Excel 5.0";
//Create the connection
ExcelConnection =
new System.Data.OleDb.OleDbConnection(ConnectionString);
//create a string for the query
string ExcelQuery;
//Sheet1 is the sheet name
//create the query:
//read columns from the Excel file
ExcelQuery =
"Select * from [Sheet1$]"; // from Sheet1";
//use "Select * ... " to select the entire sheet
//create the command
System.Data.OleDb.
OleDbCommand ExcelCommand = new System.Data.OleDb.OleDbCommand(ExcelQuery, ExcelConnection);
//Open the connection
ExcelConnection.Open();
//Create a reader
System.Data.OleDb.
OleDbDataReader ExcelReader;
ExcelReader = ExcelCommand.ExecuteReader();
//For each row after the first
while (ExcelReader.Read())
thanks,
kshitij -
How to read Excel file in java
Respected sir/madam
I want to read the values from Excel file in Java program. How can I do that. When I searched over the net I came to know that you can treat Excel file as a Database and write the code as u write for making DB connections .
I did that but i am getting the following error ..can anybody please help..
This is the code what i have written
import java.io.*;
import java.sql.*;
public class ReadExcelFile {
Connection c;
Statement stmnt;
public void checkABA_Number()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c = DriverManager.getConnection("jdbc:odbc:ExcelTest","",""); // ExcelTest is the DSN name
stmnt = c.createStatement();
ResultSet rs = stmnt.executeQuery("select * from abadata"); // abadata is my Excel file name
while(rs.next())
System.out.println(rs.getString(1)+" "+rs.getString(2));
}catch(Exception e)
System.out.println(""+e.toString());
finally
try
stmnt.close();
c.close();
catch( Exception e )
System.err.println( e );
public static void main(String[] args)
new ReadExcelFile().checkABA_Number();
My Excel file starts from the first row and first column and also the first row contains the names of the column.
It give me the following error..
java.sql.SQLException: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'abadata'. Make sure the object exists and that you spell its name and the path name correctly.
How can I deal with this.?I have properly selected the worksheet while giving the DSN . Is there any versionig problem with Excel or some drivers are in appropriate..and yes i chose Microsoft Excel Driver (.xsl) from ODBC .
I created System DSN.
Can anybody please help me with this ? I will be very gratefull for replies
Thanks in advancehere is the code to read excel file
public void readexel(String filename)
Connection c = null;
Statement stmnt = null;
try
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" + filename);
stmnt = c.createStatement();
String query = "Select * from [Sheet1$]" ;
ResultSet rs = stmnt.executeQuery( query );
while( rs.next() )
System.out.println( rs.getString(1) );
catch( Exception e )
System.err.println( e );
} -
How to Read excel or .csv files in java
I am writing a program which takes input as excel or .csv file.
How to read these files.
Any API's are existed or need to use the third party jar.
Please suggest me.
Thanks & RegardsDid you search in google? Did you search here? There are so many excel related questions here, including answers about third party libraries.
I have the impression that you didn't research at all.
_[How to ask questions|http://faq.javaranch.com/view?HowToAskQuestionsOnJavaRanch]_ It's the same here. -
How to open .xls work sheets in I phone using numbers
HHow to open .xls work sheets in I phone using numbers
Howdy Rmsdxb,
The help page linked below details how to go about opening spreadsheets on your iPhone.
Numbers Help for iPhone - Open an existing spreadsheet
http://help.apple.com/numbers/iphone/2.5/#/tan753033f43
All my best,
Allen -
We have a XML config file as attachement.
It has many jobs' configuration in it(<Job>).
For every job, therer will be a item of <JobActive> with value of Y or N.
Sometimes, we need to toggle the Y or N for some certain jobs.
I tried to read the <JobName> by the attached vi.
But when I read it, I can only read the items by sequence one by one.
Is it possible to read by the item name or by index?
We will have many <job> in the future.
Thanks,
Attachments:
Temperature Test Data.vi 58 KBHi,
I tried opening up your VI to take a closer look, but unfortunately there are broken wires corresponding to your application. Unfortunately I am not able to test your VI here. Can you please explain your application further so that we can be able to help you out.
Regards,
Nadim R
Applications Engineering
National Instruments -
How to read SAP Work place Inbox (Tcode SBWP )
Hi
I want to read the user inbox have like Documents,workflow items,deadline messages ,incorrect entries , after reading all those from inbox i want to forward to another user , Could any body tell me how to read info from Workplace Inbox and how we can forward to another user , do we have any Bapis or Functions to do this .
I appreciate you all if you could provide me information .
ThanksHi Pradeep,
you can get the workitems which is sitting in SAP users workflow Inbox through the following function module.
CALL FUNCTION 'RH_MULTIPLE_OBJ_WI_SELECT'
EXPORTING
ACT_OTYPE = 'US'
ACT_OBJID = usr_list_rs-usrid " This variable should contain user id of * the user
SEARCH_WEGID = 'US_TASKS'
SEARCH_DATE = SY-DATUM
TABLES
WI_LIST = wi_list_temp .
For ur 2nd query, take all users id from user master table & put it in Iternal table.
Next, Put the above FM inside the loop of this iternal table. For ur convenience, Pls see the below code, definitely you will get clear picture.
data: wi_list_cons like HRWFWI_L occurs 0 with header line.
data: wi_list_temp like wi_list_cons occurs 0 with header line.
loop at usr_list_rs.
CALL FUNCTION 'RH_MULTIPLE_OBJ_WI_SELECT'
EXPORTING
ACT_OTYPE = 'US'
ACT_OBJID = usr_list_rs-usrid
SEARCH_WEGID = 'US_TASKS'
SEARCH_DATE = SY-DATUM
TABLES
WI_LIST = wi_list_temp .
if wi_list_temp[] is NOT initial.
loop at wi_list_temp.
wi_list_cons = wi_list_temp.
wi_list_cons-OBJID = usr_list_rs-usrid.
append: wi_list_cons.
clear: wi_list_cons.
endloop.
clear: wi_list_temp.
refresh: wi_list_temp[].
endif. "if wi_list_temp[] is NOT initial.
endloop.
sort wi_list_cons by wi_id.
Now iternal table wi_list_cons will contain both workitem Id & user Id. Now you can easily find out that which workitem is sitting in which users SAP workflow inbox.
Please let me know if you need any further assistance regarding this.
Note:-
Please don't forget to reward points.
Thanks & Regards,
S. Manikanda. -
How to parse excel spread sheet contains merged cells in SharePoint 2010 sand box solution?
Hi All,
in my requirement i need to parse excel file which contains merged cells. i need to get this functionality in sandbox solution. in my server i can not use interop dll or open xml. can anybody help me on this.
Regards,
VenuHi Venu,
There are a couple of other threads with code samples that reads excel files from document libraries, so you can try out those if you like. You probably have to modify them a bit to adjust to Sandbox requirements, but they should do well as starting
points anyhow.
https://social.technet.microsoft.com/forums/sharepoint/en-US/81d2535c-49cc-4fad-8308-39c4a33fd004/read-excel-file-for-sandbox-solution-for-office365
http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/1fce430c-5e2c-401e-ad8a-99e890d1dcef
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5b5c96d4-17fb-42ad-8c30-e184fe26c5ef
Best Regards
Dennis Guo
TechNet Community Support -
How to read excel binary file in ABAP application server
Hi Gurus,
I have to read business partner data from the binary format of an excel file in application server. I searched in forums but only found solutions about using ole2 objects, but in ABAP application server there is no excel APIs, so I have to read binary directly. You know it is rather difficult, do you have any clues or sample function modules? Thanks!
Best regards,
HaoHi Deng,
I think there are two possible solutions:
1. Get the file created as tab-delimited or CSV as recommended earlier
2. Excel files are BIFF (Binary Interchange File Format). The Microsoft office 97 developer kit has tools for analysis and access. You may search for existing interface software or create your own ABAP code. Publish it on SDN and win great merits.
Regards,
Clemens -
Mail to File - how to read the attachment file name from the subject.
I need to use the SHeaderSUBJECT's value in the receiver file adapter's variable substitution.
This is a Mail to File scenario without design part where the attachment file name comes in the subject of the mail.
I see the below in the dynamicconfiguration section. How can i retrive the value from dynamicconfiguration section to the filename.
<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/Mail" name="SHeaderSUBJECT">PlainAttachment.txt</SAP:Record>
</SAP:DynamicConfiguration>
Points will be rewarded.Try to use sthg like this in a UDF :
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String value = conf.get(key);
or in a JAVA mapping :
DynamicConfiguration dynConf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dynKey = DynamicConfigurationKey.create((http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String keyValue = dynConf.get(dynKey);
param is the map object from the execute() method of your mapping ...
Hope this helps
Chris
Edited by: Christophe PFERTZEL on Apr 23, 2008 11:34 AM -
How to read a xml node name in xsl? Urgent!
Hi,
I've a dynamic xml which gets generated at runtime. The basic nodes remain same but the content and nodes vary.
- <root>
- <list>
- <row>
<courseStartDate></courseStartDate>
<courseEndDate></courseEndDate>
<courseName>ORACLE</courseName>
</row>
- </list>
</root>
I have an xsl which would read the values
as :
<xsl:value-of select="courseStartDate"/>
I would like to know if its possible to read the node name "courseStartDate" through xsl, which could be stored in a variable and then the corresponding value could be retrieved??
ThanksIf u want to display the name : value then u can do like this
<xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" /> -
How to get current Work Repository Name?
Hi,
Is there any API function to get the Name of the current Work Repository the session is running on?
THanksHi-
As of now there is no such API in ODI but there is other API's which is used to retrieve schema/dataserver details etc.
Hope ODI will release this API in future release. Does it help you.
Thanks,
Saravanan Rajavel
Maybe you are looking for
-
Reset cleared item in inactive fiscal year using FBRA
I want to Reset cleared item document in 2006, but now Im in active fiscal year 2008 using T-code FBRA. The error message show Reversal in different fiscal year is not allowed Message no. AA 487 Does any body could help to let me know the configurati
-
How do I remove whole CDs at a time off my iphone 5?
I know about swiping but I hate having to delete songs one at a time! Is there a way to delete whole CDs at a time or even everything in music?
-
I just went into itunes and must of click on the wrong box to update my new contacts that i put into my yahoo address book as i wanted to transfer all to iphone and when done it erased all of them, how do i get them all back
-
SMB 3.0 support???
Hello all, Does anyone know if SMB 3.0 is supported by WAAS? If not, is there an expected date for support? Thanks, Kirk
-
Streaming radio just stopped working Firefox version 8, but I can get everything else not on stream to work. Add on's are up to date. I can't recall if it happened after the Firefox up date or after listening to last.fm or what prompted it. How to fi