Read fron Excel Sheet on Browser.
Hi All,
I ve a project in which I have generated an Excel sheet taking data from XML using jakarta POI.Till now it works well, the Excel sheet is displayed on browser.Now the challenge is If user edit some data in Excel Sheet displayed on browser,there should be a Submit button clicking on which the edited data must be reflected in the XML.
Any help in this direction would be highly appreciated.
Thanks.
Thanks for sending this link, know i want to
display and existing Excel chart Using OLE is it
possible in jsp/servletYes, you can do it.
http://www.javaworld.com/javaworld/jw-03-2004/jw-0322-poi.html
Pls try to use google. Search this string in google - "Excel java OLE"
Cheers
Similar Messages
-
hi sir i am read excel sheet using labview ,but unable to plot the selected colomns,so its needfull ,please find any body to sollution to the problem .i i already did some part ,it is take too much delay
Attachments:
CSV File to XY GRAPH 13.lvproj 9 KBshambhulinga a écrit :
hi sir i am read excel sheet using labview ,but unable to plot the selected colomns,so its needfull ,please find any body to sollution to the problem .i i already did some part ,it is take too much delay
First, you are not reading an Excel sheet but a text file (a csv file is a text file). From the listing of the function used (from the lvproj file) you are using the Read From Spreadsheet function, this function will return a 2D array. Use the Index Array function to extract the x and y value columns. Bundle them (using the Bundle function) and wire the output to your XY-Graph.
Ben64 -
Error reading a Excel sheet in BDS
Hi Team,
I have uploaded an excel sheet in BDS by OAER. Now in my program I want to read the excel file. I am putting the code snippet.
DATA;
l_v_proxy TYPE REF TO i_oi_document_proxy,
l_v_control TYPE REF TO i_oi_container_control,
l_v_container TYPE REF TO cl_gui_custom_container.
CALL METHOD l_v_control->init_control
EXPORTING r3_application_name =
'BDS-DOI'
inplace_enabled = 'X'
inplace_scroll_documents = 'X'
parent = l_v_container
register_on_close_event = 'X'
register_on_custom_event = 'X'
IMPORTING retcode = v_retcode.
CALL METHOD c_oi_errors=>raise_message
EXPORTING
type = 'E'.
CALL METHOD l_v_control->get_document_proxy
EXPORTING
document_type = 'Excel.Sheet.8'
document_format = l_v_doc_format "OLE
IMPORTING
document_proxy = l_v_proxy
retcode = v_retcode.
IF v_retcode NE c_oi_errors=>ret_ok.
EXIT.
ENDIF.
CLEAR l_v_error.
CALL METHOD l_v_proxy->has_spreadsheet_interface
IMPORTING
error = l_v_error
is_available = l_v_has
retcode = v_retcode.
IF v_retcode NE 'OK'.
RETURN.
ENDIF.
But in has_spreadsheet_interface it returns error return code like 'DOCUMENT_NOT_OPEN'.
Can you please help me that what would be the possible causes of the error.
Thanks,
MainakHi,
Its clear now.
Merci
MFH -
I am trying to read a single column of data from an Excel sheet.
My Excel looks like this:
appnum
100
200
abc201
300
def301
400
500
My Excel sheet is called "appnumbers.xls" and the sheet is also called "appnumbers".
I have created the DSN and called it "appnumbers".
This is my code:
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.DriverManager;
public class readExcel
public static void main( String [] args )
Connection c = null;
Statement stmnt = null;
try
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection( "jdbc:odbc:appnumbers", "", "" );
stmnt = c.createStatement();
String query = "select appnum from [appnumbers$]";
ResultSet rs = stmnt.executeQuery( query );
System.out.println( "Found the following app numbers:" );
while( rs.next() )
System.out.println( rs.getString( "appnum" ) );
catch( Exception e )
System.err.println( e );
finally
try
stmnt.close();
c.close();
catch( Exception e )
System.err.println( e );
}The output is as follows:
100.0
200.0
null
300.0
null
400.0
500.0
1. Why do the numbers appear like integers (100 shows up as 100.0)?
2. Why do the aplhanumeric characters appear as null?Yeah, the excel odbc driver tries to gues the type of each column, based on the type of the first "data row" in each column. It's smart enough to ignore column headers, but it's not smart enough to read the whole column of values before deciding the type, so it's treating your alphanumeric values as an integer.
try sticking "abc123" in as the first data row and see what happens.
I believe, though I've never actaully done it, that you can programatically specify the datatype for each column, overriding the default silly guess work.
if that doesn't work try exporting the spreadsheet as XML and parsing it, instead of relying on the dodgy odbc driver at all.
Keith.
Message was edited by: corlettk -
Showing excel sheet in browser
we have two excell sheets, we r copying content of first excell sheet into
second one by using paste special option
so it makes OLE connection,whene evere we change the content in first sheet that will effect on second sheet.
we need second excell sheet in web Browser
we tried using jsp but it displaying in diff format like byte code
please let me Know if u find any solution for this.....Thanks for sending this link, know i want to
display and existing Excel chart Using OLE is it
possible in jsp/servletYes, you can do it.
http://www.javaworld.com/javaworld/jw-03-2004/jw-0322-poi.html
Pls try to use google. Search this string in google - "Excel java OLE"
Cheers -
How to read an excel sheet in java
hi all!
i want to read data from an excel sheet.could U plz send me the code from scratch.
thanks in advanceLook for jxl.jar (http://www.andykhan.com/jexcelapi/) or jexcel. Worked fine for me. And as for the code: see the example programs and documentation....
Sample:
private ArrayList procesExcelFile(File file){
logger.info("Processing XSL file ("+file.getAbsolutePath()+")");
ArrayList result = new ArrayList();
Hashtable xlsRow = null;
int row;
try{
// Open sheet
WorkbookSettings wbs = new WorkbookSettings();
wbs.setInitialFileSize( (int) file.length());
Workbook workbook = Workbook.getWorkbook(file,wbs);
Sheet sheet = workbook.getSheet(0);
// Init XML tags on 1st header
this.readTagLine(sheet.getRow(0));
// Read sheet row by row, skip first & empty rows
for(row = 1; row < sheet.getRows(); row++){
xlsRow = this.convertRowToTable(sheet.getRow(row));
if(!xlsRow.isEmpty()){
result.add(xlsRow);
logger.info("Processed XSL file, " + result.size() + " rows found (excl. header)");
catch(IOException ioe){
logger.error("Error reading XLS file", ioe);
succes = "false";
catch(BiffException be){
logger.error("Could not get workbook from XLS file", be);
succes = "false";
catch(OutOfMemoryError oome){
logger.fatal("Not enough memory for processing XLS file", oome);
succes = "false";
return result;
}now gimme them Duke Dollars ;) -
How i can send measurment reading to excel sheet?
q.1: i have some readings and i want to send them to excel sheet
q.2: how i can draw a gragh for these readings?
Solved!
Go to Solution.
Attachments:
Temp.vi 59 KBYou can do this directly like this right?
Attachments:
gr.vi 12 KB -
Read multiple excel sheets using dataset...
Hello Experts,
I've searched the forums and I cannot find any suitable threads for regarding my question. Anyway, I wanto to read and .XLS file residing in the application server using the DATASET commands.However, I am having a shortdump saying "An exception with the type CX_SY_CONVERSION_CODEPAGE".Continue.......
IF iref_error->has_failed = 'X'.
CALL METHOD iref_error->raise_message
EXPORTING
type = 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
CALL METHOD iref_document->release_document
* EXPORTING
* no_flush = ' '
IMPORTING
error = iref_error
* retcode =
IF iref_error->has_failed = 'X'.
CALL METHOD iref_error->raise_message
EXPORTING
type = 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
*& Form SUB_FILE_F4
* F4 help for file path
FORM sub_file_f4 .
DATA:
l_desktop TYPE string,
l_i_files TYPE filetable,
l_wa_files TYPE file_table,
l_rcode TYPE int4.
* Finding desktop
CALL METHOD cl_gui_frontend_services=>get_desktop_directory
CHANGING
desktop_directory = l_desktop
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE e001(00) WITH
'Desktop not found'.
ENDIF.
* Update View
CALL METHOD cl_gui_cfw=>update_view
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2
OTHERS = 3.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select Excel file'
default_extension = '.xls'
* default_filename =
file_filter = '.xls'
* with_encoding =
initial_directory = l_desktop
* multiselection =
CHANGING
file_table = l_i_files
rc = l_rcode
* user_action =
* file_encoding =
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE e001(00) WITH 'Error while opening file'.
ENDIF.
READ TABLE l_i_files INDEX 1 INTO l_wa_files.
IF sy-subrc = 0.
p_file = l_wa_files-filename.
ELSE.
MESSAGE e001(00) WITH 'Error while opening file'.
ENDIF. -
How to read/write Excel sheets using java
Hello,
I have downloaded poi-2.5.1-all-bin and it has
poi-2.5.1-final-20040804 , poi-contrib-2.5.1-final-20040804, poi-scratchpad-2.5.1-final-20040804 jar Files
i am unable to configure POI which i have downloaded, when i do
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
it gives error while compilation saying cannot find Sheet class, Workbook class
should i use ant to build it or which jar file path should i specify in the classpath, because i have downloaded the POI package on to my desktop and included the specified the entire path of all the jar files in the classpath but still the same problem.
Please guide me.dvrsandeep wrote:
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
it gives error while compilation saying cannot find Sheet class, Workbook class
Either it isn't in your class path or you are using the wrong names. Simple as that.
Just as a possibility since you didn't import a "Sheet" class but rather a "HSSFSheet" that certainly suggests something is wrong. -
Display Excel on browser & read the edited Excel sheet
Hi,
Till now i was using POI api to create Excel sheet and add data to the sheet. Now we had a requirement to display Excel sheet on browser. User can edit the Excel and on click of Save button, we need to read the data and save it to Database. If i use frames i can display Excel on browser. But once user edits the Excel, how to read the Excel sheet which is displayed on browser.It sounds like what you're trying to do is write an Excel<-->HTML converter, no? If you want it editable through a browser (presumably with no Excel installed) but stored in the native format?
-
Hi,
To achieve these are the steps that I had followed :
1. Add the document Library path into Central Admin -> Application Mgmt -> Manage Service App -> Excel Service App -> Trusted File Locations
2. Add Documnet Library link to Trusted Connection Proivder
3. Open Visual Studio as Run as Administrator
4.Create an SharePoint 2013 Empty Project.
5.Add Service Reference : http:\\<server>\_vti_bin/excelservice.asmx
6.Service added successfully
7.Create a class file and add the Service Reference namespace
There is no such class as ExcelService to call.
Please let me know if somebody knows how to open the Excel file into C#(2012) either using ExcelService or any other way to open. I tried old methods of Sharepoint 2010 server but it's not able to access classes.
Requirement is :
Need to read the excel sheet from Document Library and transfer all data into DataTable.
Please help asap.Hi,
This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the SharePoint 2013 development forum
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?forum=sharepointdevelopment
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support -
Reading excel sheet from out side of the server though sql developer.
Hi ALL,
Is it possible to read the excel sheet from the out side of the oracle server.
If it possible please send me the sample code.Duplicate thread.
Reading excel sheet from local system though sql developer
Also a FAQ
SQL and PL/SQL FAQ -
Reading Excel sheet the corresponding value
the corresponding value of another colum should be read from excel sheet .
soppose there are 4 coloumns and i enter the value of column one then colun 2,3,4 value should be read
Thanks
Sharad.Duplicate post.
-
Applescript to read Excel sheet
Hi All,
I'm a learner of applescript and I have a problem to solve so any help will be very appreciated.
I have thousands of photographies in a folder called "images0". I just want to organize this photos by customer (every customer has its own folder)
I have an Excel sheet with this information: column A: CustomerId / column B: photography name / and column C: name of folder (customer)
How can I read this Excel sheet to make an applescript that automatically move every picture to its correct folder?
Thank you very much to everybody!
AlexHi all
I have reached to create what I asked for by taking examples from internet. I have done it step by step following my needs and for sure there is a better and easy way to do it but it works anyway!
Now I want to create a repeat (loop) for that script but I do not reach to make it work!
I have done the script with this features:
1. Open and filter an Excel file with a given value through a dialog box
2. Select the rows filtered and create a txt file with these content on it (the content are files names)
3. Create a folder with the same name as the given value in step 1
4. Move files from the source folder to the destination folder
Anyone could help me please?
Here you are the script:
property c1 : "A"
property r1 : 1
tell application "Microsoft Excel"
--open workbook workbook file name "Macintosh HD:Users:Alex:Desktop:Libro2.xlsx"
activate object worksheet "Hoja1"
set mycriteria to text returned of (display dialog "Num client" default answer "" buttons {"OK"} default button 1)
autofilter range range "A:B" field "1" criteria1 mycriteria
set {tRow, tCol, lastCell} to {first row index, first column index, last cell} of range object of autofilter object of active sheet
select range (((get address of cell (tRow + 1) of column (tCol + 1))) & ":" & (get address of lastCell))
copy range selection
tell application "Finder"
--set theDestinationFolder to "Macintosh HD:Users:Alex:Desktop" --choose folder
set source_folder to "Macintosh HD:Users:Alex:Desktop:Images:FotoFinder2007:images0" as alias
--make new folder at theDestinationFolder with properties {name:mycriteria as string}
tell application "TextEdit"
open file "Macintosh HD:Users:Alex:Desktop:direcciones.txt"
activate
tell application "System Events"
keystroke "a" using {command down}
keystroke "v" using {command down}
keystroke "s" using {command down}
end tell
tell application "Finder"
set thefoldername to mycriteria
set this_folder to "Macintosh HD:Users:Alex:Desktop:Fotofinder"
set theFolder to (make new folder at this_folder with properties {name:thefoldername})
set source_folder to "Macintosh HD:Users:Alex:Desktop:Images:FotoFinder2007:images0" as alias
set the_files to every paragraph of (read (file "Macintosh HD:Users:Alex:Desktop:direcciones.txt"))
repeat with this_file in the_files
try
move item this_file of source_folder to theFolder --with properties {name:mycriteria as string}
end try
end repeat
end tell
end tell
end tell
end tell
(*set theDestinationFolder to desktop --choose folder
tell application "Finder"
--repeat with theIncrementValue from 1 to 10
make new folder at theDestinationFolder with properties {name:mycriteria as string}
--end repeat
end tell*) -
Giving a specific path to the reading from excel application
Hello, i want to know there is a way of giving a specific path to an application (reading from excel sheet) without all the time getting to enter the path? if someone could help. i'm using labview 8.0
Regards,
Tchaouyou could just use a path constant. Drop a path constant on the BD and right click on it and select browse and then find the file you want.
Joe.
"NOTHING IS EVER EASY"
Maybe you are looking for
-
The volume to my laptop just completely, how do i get this started again?
I have a silver HP Windows 7 Premium laptop with intel core i5 and beat audio. The volume of my computer completely stopped. I have tried everything to restore its original settings- not sure what was changed! I can hear the log-in sound but my comp
-
Hi there, I wanted to see if anyone out here had a good or very bad experience working with FCP on the newest model Mac Mini, and more so, if it is possible to use the HDMI output on the Mac Mini as a video and audio out to a TV while working. Can Pr
-
Can't import jpegs into drop zones in 7.0 themes
I've followed the thread regarding mac book pros and hang ups with iDVD 08 and the 7.0 themes. I have a G5 and can't get the 'Revolution' 7.0 them on main menu to allow me to 'drop' a jpeg into its drop zone. I drag the jpeg over, the green sign appe
-
How to use string Variables for data provider names
Really what I need to be able to do is insert the variable name in this: dataProvider="{chartXML2.lastResult.month.day}" I need to replace the "month" with a string variable name (i.e public var monthName = "January";) I also need to do the same for
-
Complex section of smart forms
before ecc 6.0 there was a option to create the complex section but in ecc 6.0 there is no such option. how to deal with it?