How to read XML SpreadSheet using OleDb Provider
Hi All,
I have generated an xml spreadsheet (*.xls) using XSL. I have another program that reads this spreasheet and processes it.
Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
Dim objCon As OleDbConnection = New OleDbConnection(sConnectionString)
objCon.Open()
Dim objCmdSelect As OleDbCommand = New OleDbCommand("SELECT * FROM [General$]", objCon)
Dim objAdapater As OleDbDataAdapter = New OleDbDataAdapter()
objAdapater.SelectCommand = objCmdSelect
Dim _DSGen As DataSet = New DataSet()
objAdapater.Fill(_DSGen)
I m facing an issue while opening a connection to the generated spreadsheet. It says "{"External table is not in the expected format."}".
My Connection string is
"Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
Do i need to change anything to this string ? I tried using a dataset and calling dataSet.ReadXml(excelFileName); But the dataset doesnt contain my table. Any inputs on how to read an xml spreadsheet ?
How to read XML SpreadSheet in OleDb? How to Convert XML SpreadSheet to Microsoft Office Excel Sheet?
Many Thanks
Hi,
You'lll most likely have better luck posting this in a Microsoft forum. This forum deals with issues specific to querying the Oracle database via the Oracle OLEDB provider.
Cheers,
Greg
Similar Messages
-
How to read StarOffice Spreadsheet using Oracle Form?
Hi all
I want to read StarOffice spreadsheet with few columns in Oracle forms.
I have done this with Microsoft Excel but not with StarOffice.
Does anyone have idea regards how to do this?
RgdsWe've done this using the OpenOffice 2.4 / LibreOffice UNO interface. There are a bunch of JAR files which are distributed together with OpenOffice: unoloader.jar, juh.jar, jurt.jar, ridl.ar, unoil.jar (in the %OPENOFFICE_HOME%/program/classes directory). You can find the documentation here (technically it's easier than OLE because OpenOffice provides a Java implementation of UNO. However, the documentation is far from being as good as Microsoft's Office API docs):
http://udk.openoffice.org/
http://wiki.services.openoffice.org/wiki/Uno
http://api.openoffice.org/ -
How to read XML file using Automatic ref No
I need to get the data from the xml file using Automatic reference No.I am a beginner .help me out
Hi Parthipan,
An easy way to get started with using XML in LabVIEW is a toolkit called EasyXML -- it's a product from JKI that I helped create
Thanks,
-Jim -
How to read XML Values using JAVA
Hi FRNDS,
I uploaded one XML File in imported Archieves, i have to read the value form XML uisng JAVA code,
using XSL able to read like xsl variable name='TimeZone' select =$linkDoc//...........*
But using java i have to read the value from XML,is it possible to read the value??
please give me some sample code.
regards,
Raja SekharBut using java i have to read the value from XML,is it possible to read the value??
Check the below JAVA code from help:
http://help.sap.com/saphelp_nwpi71/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
you can ignore the XSLT part and configure only the JAVA code...check if this suits your needs.
Regards,
Abhishek. -
Reading XML file using BAPI and then uploading that xml file data into SAP
I am getting a xml file from Java server. I need to take
data from this file using BAPI and need to upload into SAP using SAP.
Please tell me how to read XML files using BAPI's.<b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
<b>SDIXML_DOM_TO_XML</b> Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
<b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
<b>SDIXML_DOM_TO_DATA</b>
data: it_table like t001 occurs 0.
data: l_dom TYPE REF TO IF_IXML_ELEMENT,
m_document TYPE REF TO IF_IXML_DOCUMENT,
g_ixml TYPE REF TO IF_IXML,
w_string TYPE XSTRING,
w_size TYPE I,
w_result TYPE I,
w_line TYPE STRING,
it_xml TYPE DCXMLLINES,
s_xml like line of it_xml,
w_rc like sy-subrc.
start-of-selection.
select * from t001 into table it_table.
end-of-selection.
initialize iXML-Framework ****
write: / 'initialiazing iXML:'.
class cl_ixml definition load.
g_ixml = cl_ixml=>create( ).
check not g_ixml is initial.
write: 'ok'.
create DOM from SAP data ****
write: / 'creating iXML doc:'.
m_document = g_ixml->create_document( ).
check not m_document is initial.
write: 'ok'.
write: / 'converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'IT_TABLE'
DATAOBJECT = it_table[]
IMPORTING
DATA_AS_DOM = l_dom
CHANGING
DOCUMENT = m_document
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
check not l_dom is initial.
write: / 'appending DOM to iXML doc:'.
w_rc = m_document->append_child( new_child = l_dom ).
if w_rc is initial. write 'ok'.
else. write: 'Err =', w_rc.
endif.
visualize iXML (DOM) ****
write: / 'displaying DOM:'.
CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
EXPORTING
DOCUMENT = m_document
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
convert DOM to XML doc (table) ****
write: / 'converting DOM TO XML:'.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = m_document
PRETTY_PRINT = ' '
IMPORTING
XML_AS_STRING = w_string
SIZE = w_size
TABLES
XML_AS_TABLE = it_xml
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
write: / 'XML as string of size:', w_size, / w_string.
describe table it_xml lines w_result.
write: / 'XML as table of', w_result, 'lines:'..
loop at it_xml into s_xml.
write s_xml.
endloop.
write: / 'end of processing'.
end of code
Hope this will be useful.
regards
vinod -
How to read XML message present in Table using PL/SQL?
Hi,
How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
Thanks!Late reply, but hopefully better late than never.
You can possibly do it all via a single SQL statement, such as {message:id=4232077}
XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html -
How to read .xml file from embedded .swf(flash output) in captivate
I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
Here is is graphical demonstration of my query :
Message was edited by: captainmkvHi Captainmkv,
Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
Tristan, -
How to read xml file and place it into an internal table...
hello all,
can any one help me in - how to read xml data file (placed in application server) and placing the same into an internal table (remove the xml tags or say fetching the xml data without xml tags).Hi Murashali,
use this.
TYPES: BEGIN OF day,
name TYPE string,
work(1) TYPE c,
END OF day.
DATA: BEGIN OF week,
day1 TYPE day,
day2 TYPE day,
day3 TYPE day,
day4 TYPE day,
day5 TYPE day,
day6 TYPE day,
day7 TYPE day,
END OF week.
DATA xml_string TYPE string.
DATA result LIKE week.
week-day1-name = 'Monday'. week-day1-work = 'X'.
week-day2-name = 'Tuesday'. week-day2-work = 'X'.
week-day3-name = 'Wednesday'. week-day3-work = 'X'.
week-day4-name = 'Thursday'. week-day4-work = 'X'.
week-day5-name = 'Friday'. week-day5-work = 'X'.
week-day6-name = 'Saturday'. week-day6-work = ' '.
week-day7-name = 'Sunday'. week-day7-work = ' '.
CALL TRANSFORMATION ...
SOURCE root = week
RESULT XML xml_string.
CALL TRANSFORMATION ...
SOURCE XML xml_string
RESULT root = result.
Regards,
Vijay -
How to read HTML files using UTL_FILE
Hello Friends,
How to read HTML files using UTL_FILE package ? According
to Oracle documentation UTL_FILE can read or write OS Text Files.
Thanx in advance..
AdiHI Hareesh,
i have gone through that blog.
i tried it...but i am getting mapping error no receiver determination fond because there are so many excel files.
my data is available on sharedString.xml but also it is in not same order.
i have no clue how to handle this part form the blog.
"This way our mapping will receive all data from the sheet in an XML format. The only thing that's left is to create an XSD file from the XML file we received in order to be able to use it in the mapping and as our Service Interface and we can proceed with mapping. As you can see from the sheet.xml files all the data is placed with column name and row number so it's not that difficult to map it to an table type format using the Message Mapping only (no java, abap mapping required)." -
How to read xml file as shown below.
Hello,
I am using flash builder 4 and currently working on implementing AIR application.
I need to read xml file data.
Normal xml files are easy to read and i am much more aware of it.
But can any one have idea how to read XML file which is given below.
<node>
<key>ID</key>
<integer>1</integer>
<key>Name</key>
<string>Dhwani</string>
<key>Postno</key>
<integer>20</integer>
<key>deskname</key>
<string>flex</string>
<key>empid</key>
<integer>25</integer>
<key>projectname</key>
<string>abc</string>
</node>
Here i have xml file in form of key value pair. <key> node shows name of the key and after that <integer> or <string> node are the value for that specific key.
if i select node.key then it shows me all the keys. and from that i cant make out what is the value for key ID.
Is there any way to take first node and then second. i mean first i ll take value of key and store it into some arraycollection. and then value will be stored.
Any help is appreciated.. Looking for positive reply.
Thanks
DhwaniThere are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.
-
How to access xml file using c
how to access xml file using c. are there any libraries regarding xml fastinfoset in c? Please let me know about any resources if u know? thanks!!!
samithaThere are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.
-
How to read XML file and update the data in MS CRM 2011?
Hi Folks,
Can anyone please help me finding some references to read XML files and push the data to MS CRM 2011 preferably by using a console application.
Please let me know if any ways of handling it in simple ways.
Thanks,
SriHI,
How to read XML file:
https://social.msdn.microsoft.com/Forums/en-US/5dd7261b-86c4-4ca8-ba87-95196ef3ba50/need-to-display-xml-file-in-textboxes-edit-the-data-and-save-the-new-xml-file?forum=csharpgeneral
How to work with CRM:
ClientCredentials credentials = new ClientCredentials();
credentials.Windows.ClientCredential = new System.Net.NetworkCredential("USER", "Password", "Domain");
Uri uri = new Uri("http://server/Organization/XRMServices/2011/Organization.svc");
OrganizationServiceProxy proxy = new OrganizationServiceProxy(uri, null, credentials, null);
proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
IOrganizationService service = (IOrganizationService)proxy;
//using "service" you can create, update and retrieve entities.
More information here about service functions:
https://msdn.microsoft.com/en-us/library/gg328198.aspx -
I'm getting xml from customFieldsFeed.getEnumerationValues() it is comming from a web services looks like this
<xml-fragment xmlns:b=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""
xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:a=""http://schemas.xxxxxxxx""
xmlns:u=""http://docs.oasis-open.org/wss/xxxxxxx-utility-1.0.xsd""
xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">
<b:anyType i:type=""a:Enumeration"">
<a:EnumerationID>AAAAA</a:EnumerationID>
<a:Name>A3 MFD</a:Name>
</b:anyType>
<b:anyType i:type=""a:Enumeration"">
<a:EnumerationID>BBBBB</a:EnumerationID>
<a:Name>A3 Printer</a:Name>
</b:anyType>
<b:anyType i:type=""a:Enumeration"">
<a:EnumerationID>CCCCC</a:EnumerationID>
<a:Name>A4 MFP</a:Name>
</b:anyType>
</xml-fragment>"
I need to read EnumerationID ex if AAAAA need to retrive Name value " A3 MFD"
java 1.6
Thanks,
HJThis could be a starting point:
http://stackoverflow.com/questions/2811001/how-to-read-xml-using-xpath-in-java
bye
TPD -
How ejb-jar.xml is Used by ejb Container
Hi,
Can anyone please explain me about how ejb-jar.xml is Used by ejb Container when a request is sent by a client(ie StandAlone program or a WebService)
Thanks in Advance
Venkat.Hi Benny,
Nice answer to a self explainig question :-).
Regards,
Daniel
p.s. THX to Sun and J2EE 5 and especially EJB3 (and don't forget about SAP, NWCE is really cool!!!) -
Reading XML file using BAPI I must use adapters .
Reading XML file using BAPI and then uploading that xml file data into SAP using BDC.
I cant take file on to my Application server I am getting the file dynamically from other file server and I need to use BAPis to read data from XML file.please tell me what should be my Import,Export and Tables parameterrs should be.
ThanksHi,
Import, export and table parameters for BAPI is required, without that BAPI will not able to collect the data from XML. What you need to do is write a Zprogram and collect the data, store that data in internal table and call the BAPI by passing required parameters.
Different Scanarios:
1) Before calling a BAPI write some other program which collects the data from XML and create a UNIX file. Try to get the data from UNIX FILE
2) If you see the XML tags, data will be in side that tags, try to get the data from XML tags and store that data in one SAP table. You can use the BAPI by fetching the data from table
3)Create a table and store the data in the table. Use the table in SAP to extract the data.
BAPI won't work without any parameters, you have to pass some parameters then the BAPI will return some values.
Hope i am clear.
Thanks&Regards,
-Suresh Revuru
Maybe you are looking for
-
Install software won't install...ipod doesn't connect
Hi, I just bought a new ipod mini, i have a laptop, and connect w/usb cable. I followed the instructions, and did not connect the ipod until the software said to connect it to see if it needed to be updated, well, i plug it in, and the apple logo com
-
I know how to use "navto" to jump to pages within the catalog created for our app. We want to use the same article files to create a digital page turner using DPS but cannot figure out how to do it. Google searches lead to answers that say it isn't p
-
What benefits do I lose by clearing cache?
I've been advised to "delete Cashes.db" and "to Empty Caches" as steps in speeding up by slow Safari? What advantages to having these do I lose by doing either or both of these; that is, are there any important functions, such as slower speed for a
-
Need help in writing SELECT (strange, to many data in output?)
Hi, I have:drop table jk_t1; drop table jk_t2; create table jk_t1 ( c1 number, c2 varchar2(3), c3 number create table jk_t2 ( d1 number primary key, d2 varchar2(4) alter table jk_t1 add constraint t1_t2_fk foreign key (c3) references j
-
How to search Products based on content of Custom 1 and Custom 2 fields
I have a client who has only 6 products but each product has 30 colour and 6 size variations (for each colour of each prdouct) thus creating 1080 separate prdoucts which all need to be sold be individual product codes and with managing inventory leve