Export offline mobile app datagrid to file able to open in Excel

I created an offline mobile app using Flash and I have a datagrid I would like to export/save as a file (csv maybe) that can later be opened by Excel.  I appreciate any help.

My datagrid looks like this...
Time
Description
Duration
00:03
Loud
4
00:28
Smatter
7
00:50
Medium
10
01:06
Loud
6
02:07
Loud
8
I used this code to create the datagrid...
import fl.data.DataProvider;
import fl.controls.DataGrid;
import fl.controls.dataGridClasses.DataGridColumn;
var historyArray:Array = [];
historyArray = [];
list_history.dataProvider = new DataProvider(historyArray);
var list_history:fl.controls.DataGrid;
list_history.addColumn("Time");
list_history.addColumn("Description");
list_history.addColumn("Duration");
list_history.columns = ["Time", "Description", "Duration"];
I tried modifying the code you shared with me, but I think I am confusing myself more. Do you see where I am making mistakes with the code below?
var data:Array  = [];
   // data header
    data[0] = {a:'Time',b:'Description',c:'Duration'};
    // data body
     for (var i:int = 0;i<list_history.columns.length;i++)
data[i] = {a:list_history.columns.dataField ('Time'),b:list_history.columns.dataField ('Description'),c: list_history.columns.dataField ('Duration')};
//make a csv string
    var csv:String = '';
    for (var i:int = 0;i<list_history.columns.length;i++)
               csv += data[i].a + ',' + data[i].b + ',' + data[i].c+'\n';
    //write to disk
     stage.doubleClickEnabled = true;
     stage.addEventListener(MouseEvent.DOUBLE_CLICK,writeCSV);
    function writeCSV(event:MouseEvent):void
         var file:FileReference = new FileReference();
         var bytes:ByteArray = new ByteArray();
         bytes.writeUTFBytes(csv);
         file.save(bytes,'test.csv');
Thank you for your help on this.

Similar Messages

  • My Numbers file sent to somebody is not able to open in Excel can anybody help to solve this problem?

    my Numbers file sent to somebody. He is not able to open in Excel can anybody help to solve this problem?

    Numbers files are not compatible with MS Excel.  To share a Numbers file with Excel you need to export you Numbers file in MS Excel format.  To do this:
    1) Open you Numbers document
    2) select the menu item "File > Export..."
    3) select "Excel" for the target output
    4) click next and select where to save the file.
    5) email the file you saved

  • How to make file able to open on pc

    how to make file able to open on pc

    ekohanowich wrote:
    how to make file able to open on pc
    I assume you mean Windows Computer.
    in Keynote:   file > export > PowerPoint
    Each Windows machine will need  Powerpoint or PowerPoint Viewer installed.

  • How do I open a postscript file, like I open an excel file?

    I'm trying to open a file that I saved as a .ps.
    I want to open it in the same maner as I open an excel file?

    To open an excel file, such as *.xls, you need Excel; to open a *.ps file, you need Ghostscript. It's free. You should be able to find it on internet.
    George Zou
    http://gtoolbox.yeah.net
    George Zou
    http://webspace.webring.com/people/og/gtoolbox

  • InDesign png export for mobile app

    Dear All,
    I have put together a number of text boxes and images in InDesign Creative Cloud CS6 and exported them as one png (or jpeg) image for use in a jQuery mobile iPhone app that I'm creating in Dreamweaver.  Will this work?  Rather than inserting text box, image, text box, images, text box, images, etc. into a page of the mobile app, can I just create one png image in InDesign that includes everything, various text boxes, images, wrapped images, html active inserts, etc., and have people scroll through it as a page in the iPhone app?  The InDesign file for this one page is about 1.1 mb right now.  Will this png image be able to zoom and do everthing it needs to do in the iPhone app?  Creative Cloud CS6 - Mac - Lion 10.7.4.  Thanks.
    Small Town Gal

    Dear Jongware,
    My thinking is the same as yours.  If the iPhone app will allow you to zoom a single image, it must allow you to also zoom a compounded image.  I like the design format of InDesign better than the jQuery Mobile design page in Dreamweaver because InDesign allows you to do text wrap around images and just set things up in a more dynamic fashion.  We still want people to be able to zoom in on a single smaller image in order to view it up close, however so if the code in the iPhone app allows the viewer to zoom in on an individual image, it should allow a scroll and zoom in on a larger page that is also a png image -- makes sense to me. The scroll feature works in the multiscreen view and in Safari browser, but it doesn't allow a zoom preview -- I'll have to do that in the iPhone itself. 
    Anyone else out there have any ideas?  Thanks to Jongware.
    Small Town Gal

  • Not able to open MS Excel attachment in the email Using SO_NEW_DOCUMENT_ATT

    Hi, I am not able to open the attached MS excel in the mail its giving error as "Problems came up in the following areas during load Table". My requirement is to send a colored excel as attachment through mail when the program is executed in background. For this i have reffered the following link " http://wiki.sdn.sap.com/wiki/display/Snippets/FormattedExcelasEmailAttachment". That is i have used the XML method for this . I would be thankful if you can let me know where i am doing the mistake For refference i am pasting my code: * Send mail when executed in background mode IF sy-batch eq 'X'. PERFORM send_mail_bkgrnd. ELSE. " Foreground mode PERFORM build_layout. PERFORM build_field_cat. PERFORM display. ENDIF. FORM SEND_MAIL_BKGRND . PERFORM process_xml_data. PERFORM disatch_mail. ENDFORM. " SEND_MAIL_BKGRND &---- *& Form PROCESS_XML_DATA &---- FORM PROCESS_XML_DATA . DATA lv_xlwidth TYPE i. * Creating a ixml Factory l_ixml = cl_ixml=>create( ). * Creating the DOM Object Model l_document = l_ixml->create_document( ). * Create Root Node 'Workbook' l_element_root = l_document->create_simple_element( name = 'Workbook' parent = l_document ). l_element_root->set_attribute( name = 'xmlns' value = 'urn:schemas-microsoft-com:office:spreadsheet' ). ns_attribute = l_document->create_namespace_decl( name = 'ss' prefix = 'xmlns' uri = 'urn:schemas-microsoft-com:office:spreadsheet' ). l_element_root->set_attribute_node( ns_attribute ). ns_attribute = l_document->create_namespace_decl( name = 'x' prefix = 'xmlns' uri = 'urn:schemas-microsoft-com:office:excel' ). l_element_root->set_attribute_node( ns_attribute ). * Create node for document properties. r_element_properties = l_document->create_simple_element( name = 'TEST_REPORT' parent = l_element_root ). l_value = sy-uname. l_document->create_simple_element( name = 'Author' value = l_value parent = r_element_properties ). * Styles r_styles = l_document->create_simple_element( name = 'Styles' parent = l_element_root ). * Style for Header r_style = l_document->create_simple_element( name = 'Style' parent = r_styles ). r_style->set_attribute_ns( name = 'ID' prefix = 'ss' value = 'Header' ). r_format = l_document->create_simple_element( name = 'Font' parent = r_style ). r_format->set_attribute_ns( name = 'Bold' prefix = 'ss' value = '1' ). r_format = l_document->create_simple_element( name = 'Interior' parent = r_style ). r_format->set_attribute_ns( name = 'Color' prefix = 'ss' value = '#92D050' ). r_format->set_attribute_ns( name = 'Pattern' prefix = 'ss' value = 'Solid' ). r_format = l_document->create_simple_element( name = 'Alignment' parent = r_style ). r_format->set_attribute_ns( name = 'Vertical' prefix = 'ss' value = 'Center' ). r_format->set_attribute_ns( name = 'WrapText' prefix = 'ss' value = '1' ). r_border = l_document->create_simple_element( name = 'Borders' parent = r_style ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Bottom' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Left' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Top' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Right' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). * Style for Data "Color properties are set over here r_style1 = l_document->create_simple_element( name = 'Style' parent = r_styles ). r_style1->set_attribute_ns( name = 'ID' prefix = 'ss' value = 'Data' ). r_border = l_document->create_simple_element( name = 'Borders' parent = r_style1 ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Bottom' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Left' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Top' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). r_format = l_document->create_simple_element( name = 'Border' parent = r_border ). r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Right' ). r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ). r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ). * Worksheet r_worksheet = l_document->create_simple_element( name = 'Worksheet' parent = l_element_root ). r_worksheet->set_attribute_ns( name = 'Name' prefix = 'ss' value = 'Sheet1' ). * Table r_table = l_document->create_simple_element( name = 'Table' parent = r_worksheet ). r_table->set_attribute_ns( name = 'FullColumns' prefix = 'x' value = '1' ). r_table->set_attribute_ns( name = 'FullRows' prefix = 'x' value = '1' ). * Column Formatting DO 32 TIMES. CASE sy-index. WHEN 1. lv_xlwidth = '300'. WHEN 2. lv_xlwidth = '300'. WHEN OTHERS. lv_xlwidth = '300'. ENDCASE. PERFORM clmn_formatting USING lv_xlwidth. ENDDO. * Blank Row r_row = l_document->create_simple_element( name = 'Row' parent = r_table ). * Column Headers Row r_row = l_document->create_simple_element( name = 'Row' parent = r_table ). r_row->set_attribute_ns( name = 'AutoFitHeight' prefix = 'ss' value = '1' ). * VC. No. r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ). r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ). r_data = l_document->create_simple_element( name = 'Data' value = 'VC No.' parent = r_cell ). r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ). * Source r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ). r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ). r_data = l_document->create_simple_element( name = 'Data' value = 'Source' parent = r_cell ). r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ). DO 30 TIMES. * * TPLGRP r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ). r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ). r_data = l_document->create_simple_element( name = 'Data' value = '' parent = r_cell ). r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ). ENDDO. * Blank Row after Column Headers r_row = l_document->create_simple_element( name = 'Row' parent = r_table ). DO 32 TIMES. r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ). r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ). ENDDO. * Data Table CLEAR gs_output. LOOP AT gt_output INTO gs_output. r_row = l_document->create_simple_element( name = 'Row' parent = r_table ). DO 32 TIMES. CASE sy-index. WHEN 1. a_dvalue = gs_output-vc_number. WHEN 2. a_dvalue = gs_output-source. WHEN 3. a_dvalue = gs_output-tplgrp_01. WHEN 4. a_dvalue = gs_output-tplgrp_02. WHEN 5. a_dvalue = gs_output-tplgrp_03. WHEN 6. a_dvalue = gs_output-tplgrp_04. WHEN 7. a_dvalue = gs_output-tplgrp_05. WHEN 8. a_dvalue = gs_output-tplgrp_06. WHEN 9. a_dvalue = gs_output-tplgrp_07. WHEN 10. a_dvalue = gs_output-tplgrp_08. WHEN 11. a_dvalue = gs_output-tplgrp_09. WHEN 12. a_dvalue = gs_output-tplgrp_10. WHEN 13. a_dvalue = gs_output-tplgrp_11. WHEN 14. a_dvalue = gs_output-tplgrp_12. WHEN 15. a_dvalue = gs_output-tplgrp_13. WHEN 16. a_dvalue = gs_output-tplgrp_14. WHEN 17. a_dvalue = gs_output-tplgrp_15. WHEN 18. a_dvalue = gs_output-tplgrp_16. WHEN 19. a_dvalue = gs_output-tplgrp_17. WHEN 20. a_dvalue = gs_output-tplgrp_18. WHEN 21. a_dvalue = gs_output-tplgrp_19. WHEN 22. a_dvalue = gs_output-tplgrp_20. WHEN 23. a_dvalue = gs_output-tplgrp_21. WHEN 24. a_dvalue = gs_output-tplgrp_22. WHEN 25. a_dvalue = gs_output-tplgrp_23. WHEN 26. a_dvalue = gs_output-tplgrp_24. WHEN 27. a_dvalue = gs_output-tplgrp_25. WHEN 28. a_dvalue = gs_output-tplgrp_26. WHEN 29. a_dvalue = gs_output-tplgrp_27. WHEN 30. a_dvalue = gs_output-tplgrp_28. WHEN 31. a_dvalue = gs_output-tplgrp_29. WHEN 32. a_dvalue = gs_output-tplgrp_30. ENDCASE. PERFORM fill_data_val_excel USING a_dvalue. ENDDO. CLEAR gs_output. ENDLOOP. * Creating a Stream Factory l_streamfactory = l_ixml->create_stream_factory( ). * Connect Internal XML Table to Stream Factory l_ostream = l_streamfactory->create_ostream_itable( table = l_xml_table ). * Rendering the Document l_renderer = l_ixml->create_renderer( ostream = l_ostream document = l_document ). l_rc = l_renderer->render( ). * Saving the XML Document l_xml_size = l_ostream->get_num_written_raw( ). ENDFORM. " PROCESS_XML_DATA &---- *& Form DISATCH_MAIL &---- FORM DISATCH_MAIL . DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE. DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE. DATA: objbin LIKE solix OCCURS 10 WITH HEADER LINE. DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE. DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE. DATA: doc_chng LIKE sodocchgi1. DATA: tab_lines LIKE sy-tabix. DATA: l_num(3). DATA: subj_date(10) TYPE c. * Mail Subject data lv_date TYPE d. lv_date = sy-datum. CONCATENATE lv_date6(2) '-' lv_date4(2) '-' lv_date+0(4) INTO subj_date. CONCATENATE 'SAP Application Usage Report ' subj_date INTO doc_chng-obj_descr SEPARATED BY space. * Mail Contents objtxt = 'Dear User,'. APPEND objtxt. CLEAR objtxt. APPEND objtxt. CONCATENATE 'Please find the attached SAP Application Usage Report for ' subj_date INTO objtxt SEPARATED BY space. " Mail Contents APPEND objtxt. CLEAR objtxt. APPEND objtxt. objtxt = 'Thanks & Regards,'. APPEND objtxt. objtxt = 'Himanshu Kanekar'. APPEND objtxt. DESCRIBE TABLE objtxt LINES tab_lines. READ TABLE objtxt INDEX tab_lines. doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ). * Packing List For the E-mail Body objpack-head_start = 1. objpack-head_num = 0. objpack-body_start = 1. objpack-body_num = tab_lines. objpack-doc_type = 'RAW'. APPEND objpack. * Creation of the Document Attachment LOOP AT l_xml_table INTO wa_xml. CLEAR objbin. objbin-line = wa_xml-data. APPEND objbin. ENDLOOP. DESCRIBE TABLE objbin LINES tab_lines. objhead = 'SAP Login Details'. APPEND objhead. * Packing List For the E-mail Attachment objpack-transf_bin = ''."'X'. objpack-head_start = 1. objpack-head_num = 0. objpack-body_start = 1. objpack-body_num = tab_lines. CONCATENATE 'SAP_Login_Details' subj_date INTO objpack-obj_descr SEPARATED BY space. objpack-doc_type = 'XLS'. objpack-doc_size = tab_lines * 255. APPEND objpack. * Target Recipent CLEAR reclist. reclist-receiver = reclist-rec_type = 'U'. APPEND reclist. * Sending the document CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = doc_chng put_in_outbox = 'X' commit_work = 'X' TABLES packing_list = objpack object_header = objhead contents_txt = objtxt contents_hex = objbin receivers = reclist EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 operation_no_authorization = 4 OTHERS = 99. ENDFORM. " DISATCH_MAIL

    Refer:
    http://www.sap-img.com/abap/sending-mail-with-attachment-report-in-background.htm
    http://www.saptechies.com/sending-mail-with-attachment-report-in-background/

  • Passworded Excel 97-2003 file will not open in excel 2013

    I can not open a file that I have saved as a passworded 97-2003 excel file using excel 2013.  When opening the file, it will ask for the password, I put in the password in, and excel freezes and then has to clkose because it will not open the file. 
    The file is NOT corrupt and will open on my computer with Office2007.  I can actually create a passworded file with excel 2013 but save it as a 97-2003 version, but when I try to open that file it will not open either? 
    Please explain to me how I am suppose to get the information off my 97-2003 file on this excel 2013 version?????? 
    AGAIN the file is not corrupt and I don't want to open my file with my 2007 version machine, I want this passworded 97-2003 file to open with my excel 2013 machine!!!!!!! 
    Please send me a fix to this, and I've check the forum.  None of the work around options work.  NONE, I've checked them all.
    This only appears to be a problem with a passworded 97-2003 file.  If it's not passworded it opens.

    Hi,
    I have not been able to reproduce as I am able to open password protected .XLS Binary Format Files with Excel 2013. Can you provide more information?
    Also, I don't believe this is a SharePoint Question?
    -Ivan
    -Ivan

  • Export Release Build for datagrid [xml file doesnt show?]

    SRC folder
              assets
                        icons
              db.xml (located within assets folder)
    datagrid.mxml
    default.css
    I am able to load the database and it populates my "db.xml" with no issues, however when I export release build and run the app - the database displays but with no information?  I noticed that the my "db.xml" was not exported as well.
    It is set up correctly? or do I need to just drop my icons, db.xml within src folder and not seperate them?
    thanks

    When you export a release build, it takes all your MXML And ActionSCript files and turns them into a SWF without the extra debugging code.  If you are not embedding the XML in the swf, then this is expected behavior.
    In your project properties, under Flex Compiler you can try checking the "copy non-embedded files to output folder"; but I believe this is only for debugging purposes and not for exporting a release build.

  • 20 mb excel file are not open in excel 2013

    Dear Microsoft,
    We are facing the  problen in excel 2014. When i open my  20 mb excel sheet ....it goes hang & showing the error..that Microsoft excel stop working .Please provide a setting solve this Issue.?

    Hi,
    Did the issue only occur with the 20MB Excel file or all the Excel file? Which file format are you using? XLS or XLSX? Did the file has some formula or macro?
    If only the special file encounter the issue, it may be caused by the file itself. We may try to clean the hidden options.
    Steps: Home tab>Find & Select>Go to> Object> Delete.
    If the file has some formulas or macros with large data, the issue may be related to the PC's performance. The machine cannot do the calculation/operation at the moment.
    If all the file has the issue, please refer to the following method and check if they are helpful:
    Method 1: Verify/install the latest updates
    Method 2: Start Excel in safe mode
    Method 3: Investigate possible issues with add-ins
    Method 4: Check whether your antivirus software is up to date or is conflicting with Excel
    Method 5: Make sure that Excel is not being used by another process
    Method 6: Check whether your file is being generated by a third party
    Method 7: Test by using a new local or network profile
    Method 8: Perform a selective startup to determine whether a program, process, or service conflicts with Excel
    Method 9: Repair or reinstall your Office program
    For more detail information, please refer to the following link:
    http://support.microsoft.com/kb/2758592/en-us
    Regards,
    George Zhao
    TechNet Community Support

  • Error code 19 fios Mobile app

    I try to log into the app and it says we apologize but we were unable to process your request. Try again in a few minutes. Error code 19.

    We were struggling with the very same problem. The FIOS Mobile app worked fine on my older iPad (3rd gen) but kept returning Error Code 23 on my wife's new iPad Mini (purchased new in January 2014).
    What worked for us was to do a full firmware restore using iTunes on our Mac. Connect your iPad to your Mac, run iTunes, then hold down the sleep/wake and the home button until the iPad screen goes black, then release the sleep/wake button (but continue to hold the Home button - this is important). You'll be prompted in iTunes (on Mac) to restore the iPad.
    We followed the prompts and eventually the ipad was restored to "factory defaults". By setting up the iPad as a "new iPad" it prevented any of the old apps from loading. We then re-installed just the FIOS Mobile app and we were able to log in successfully.
    What's nuts about this is that when we tried to restore the iPad from a backup we had made with iTunes, all the settings came back but SO DID THE ERROR CODE 23. It seems something got setup in the iPad settings that conflicts with the functioning of the FIOS Mobile app.
    We had to restore the rests of the settings and apps manually. Once this was done, however, the FIOS Mobile app continues to work properly. Whew!
    I'd really like to know what, specifically, the setting is that trips up the FIOS Mobile app. Alas, I don't think I'll ever learn the true reason for the problem, but at least it's working now.
    Good luck!

  • I am not able to open a PDF file that I just created. I get an access denied message instead.

    I am not able to open a PDF file that I just created. I get an access denied message instead.

    Thanks for asking.
    I was combining different types of files into a single PDF. Some of them were excel spreadsheets and I had set the print areas in each file. When I cleared the print area the problem stopped. So I am assuming that had something to do with it. Though I am not sure.
    The strange thing was that I was able to open the excel source documents after creating the faulty PDF but some of the MS word source documents also had "access denied" status. I still cannot figure that part out.

  • Building apps including CVS files

    Hi
    Could someone point me to a simple guide for creating Java apps with CVS files.
    I have an excel file that I have converted to .csv just by changing it in the file > save as window to cvs.
    I need to read values from this file and cross-check a particulat column of data (Date/Time of order) against the current day's date/time in order to highlight 24 hour notice ordering for customers.
    First off, what is it I need to do/understand when using a file such as this where I will be reading data from it?
    I have had a look at stuff on the net but most of it seems to become quite complicated quite quickly and I don't really understand what they are trying to achieve.
    What would be good would be to create a simple app first where I just read the data and display it in cmd line for example, then build on that, just to prove to myself that I understand each step.
    Thanks for any pointers.
    JM

    1. Check your spelling at all times...CVS is "Concurrent Versioning System", which has absolutely nothing to do with your post.
    CSV is "comma-separated values", which is what you are needing help with.
    2. Look up the StringTokenizer API in the JavaDocs. This class will help you to break your CSV file down into component parts that you can then load into a String array, for example.
    I wrote a function quite a while back (but have no clue where the source code has gone) that did just what you are wanting to do. It read in all of the values from a CSV file to populate the fields of a database table, so that I wouldn't need to manually enter over 1000 records. I used the StringTokenizer API to break my file down into its component record fields. All that I really remember about it was that I had issues with the quotation marks that appeared in the body of a field. For example, the field "description" contained a textual description of the product and included the product's dimensions, which used the double quotation mark as the inch symbol. This caused me problems because each of the field values were surrounded by double quotation marks, so I had set up my StringTokenizer to strip the double quotation marks, which ended up also terminating a field's value after the first inch dimension and dropping the rest of the dimensions. To get around this problem, I performed a global search and replace on my CSV file replacing the double quotation marks with a caret (^) and then modified my StringTokenizer . After that work, everything worked like a charm.
    Having said all of that, let me sum it up by saying take a look at the StringTokenizer API documentation and you will start to see how to do what it is you are trying to do. That documentation is at: [http://java.sun.com/javase/6/docs/api/java/util/StringTokenizer.html|http://java.sun.com/javase/6/docs/api/java/util/StringTokenizer.html]
    I hope that this information helps. Good luck with your project!
    Cheers,
    Sean Carrick
    PekinSOFT Systems

  • Opening multiple excel files thorugh a servlet

    Hi
    In my system , i have excel reports in my server disk . And i am opening the excel files through an servlet class like /viewReport.do?id=23 .....and thus from the servlet will open my excel file .
    After opening one excel file , i try to open another excel by clicking that link , then my system often hangs else excel shows an error saying "a report with name viewReport.do is already open " even though both of these files are different on the server
    How can i avoid this ??
    The reason why i am opening the excel file through a servlet is , i need to perform some operations before opening that excel report
    Can any one let me know how to go abt this ??

    I had a similar porblem....
    I got some help from...http://www.javaworld.com/javaworld/jw-10-2006/jw-1019-xmlexcel.html?page=1...
    This is my code in servlet...
    HSSFWorkbook wb = new HSSFWorkbook();
         HSSFSheet spreadSheet = wb.createSheet("Users");
         spreadSheet.setColumnWidth((short) 0, (short) (256 * 25));
         spreadSheet.setColumnWidth((short) 1, (short) (256 * 25));
    //     Creating Rows
         HSSFRow row = spreadSheet.createRow(0);
         HSSFCell cell = row.createCell((short) 1);
         cell.setCellValue("Year 2005");
         cell = row.createCell((short) 2);
         cell.setCellValue("Year 2004");
         HSSFRow row1 = spreadSheet.createRow(1);
         HSSFCellStyle cellStyle = wb.createCellStyle();
    cellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
    cell = row1.createCell((short) 0);
    cell.setCellValue("Revenue ($)");
    cell = row1.createCell((short) 1);
    cell.setCellValue("25656");
    cell = row1.createCell((short) 2);
    cell.setCellValue("15457");
    FileOutputStream output = new FileOutputStream(new File("/tmp/Users.xls"));
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment;filename=Users.xls");
    ServletOutputStream out = response.getOutputStream();
    wb.write(output);
    output.flush();
    output.close();
    forward = null;
    In firefox i get the download dialog box but not able to open in from there,i need to save it and then open. In IE i dont get the dialog box instead the excell open inside the browser......Please help me to open a excel sheet onclick on a link "Export to excel" in jsp......
    Thanks in advance...
    Message was edited by:
    onlycoding

  • Excel sheet is not able to open in edit mode.

    Hi all,
    I have one issue where user is not able to open an excel file in edit mode. 
    User uploaded .XLS file and have MS office 2003 installed on her system.
    I asked her to save it as .xlsx and then upload it again....any idea why she is not able to open in edit mode.

    Hi,
    What did you mean that the user is not able to open an excel file in edit mode?
    Whether he or she can find "Edit in Microsoft Excel" via clicking the right of the name of the file.
    If yes, when he or she clicked it, whether there are some errors occurred.
    Whether other users can open the excel file in edit mode.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Opening word, excel, pdf, jpeg files as attachments on iphones

    I've always been able to open word, excel, pdf & jpeg files as attachments on my iphone 5.  But recently, everytime I tried to open one of these, the file image turned up all grey, and in the case of jpeg files, it just kept on loading, loading & loading, but never finished loading ...  It seems like this happened after I updated to IOS 6.1.4 recently...  This is just a guess.  Could anyone help me with this?  Thank you.

    Srinivas,
    Thank you for your reply. It helped me get to a solution. In essence I needed to copy the Unix file to an internal table and then save it to the end user's PC file. Then I am able to open the document / attachment.
    I created a new function to:
    1) call method cl_gui_frontend_services=>directory_browse,  to ask the end user to pick a PC directory to copy the Unix file attachment to.
    2) Then  using the following code, copy the Unix file (as determined by application or user) to an internal table. Note that the line is not limited by a certain length.
      types: begin of t_tab,
              line type string,
             end of t_tab.
      data: k_wa_itab type t_tab,
            t_it_itab type standard table of t_tab.
    open dataset v_unixfilename for input in binary mode.
      if sy-subrc <> 0.
        raise unix_filename_read_error.
      endif.
      do.
        read dataset v_unixfilename into k_wa_itab-line.
        if sy-subrc <> 0.
          exit.
        endif.
        append k_wa_itab to t_it_itab.
      enddo.
      close dataset v_unixfilename.
    3) Using call method cl_gui_frontend_services=>gui_download, save the contents of the internal table to the PC directory from step 1 above.
    4) Open the Attachment from the end users PC via:
    call method cl_gui_frontend_services=>execute
    It seems like a long way to get this to work, but it is working. If there is a better way maybe someone else can fill in the blanks. Ideally a tool to read and open from a file from Unix without using the cl_gui_frontend_services would be ideal.

Maybe you are looking for

  • Setting textfield focus in ActionScript 3.0

    I am using an event handler to listen for MOUSE_UP on stage_mc to let the user create text and images on the screen. I have buttons above the stage that set a variable, then the variable determines which action occurs with the mouse event. I would li

  • TextEdit won't display recent files

    TextEdit won't display recent files!  THIS USED TO WORK-- but now all I see is the words (greyed-out) "Clear Menu".  Not even sure what that means. My recent files works fine in WORD and other applications that offer this.  Any comments appreciated a

  • How to transfer Effects Presets from 5.5 to 6 ?

    This must be simple, but i don't know where Premier saves my presets...i can easily go to effects and then select import preset...but can anyone tell me where my 5.5 presets are installed? I have PILES of them and would like to just easily bring them

  • Alert system with JEE

    Hello, I want to build an alert system with JEE. App server will listen to events in our network (snmp traps, new data in database, other servers will triger event...) and if an event ocurs it will pass it to users. My main problem is how to notify u

  • Having trouble with intial set up

    having trouble with initial set up!