[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 --- Additional comments from [EMAIL PROTECTED] Thu May 5 19:35:42 -0700 2005 --- Good Call. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User cloph changed the following: What|Old value |New value Status|RESOLVED |CLOSED --- Additional comments from [EMAIL PROTECTED] Wed May 4 09:52:28 -0700 2005 --- Not the problem itself is invalid, but the issue is to messy to be handled properly. Please start over with a clear, short description and simple testcase. feel free to refer to this issue in the new one and add the issue number of the new one to this issue. Thank you. closing issue. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User cloph changed the following: What|Old value |New value Status|NEW |RESOLVED Keywords| |oooqa Resolution| |INVALID --- Additional comments from [EMAIL PROTECTED] Wed May 4 09:50:12 -0700 2005 --- @alanchristiansen: Please keep the comments short and easy to parse. I for one that did not follow this issue could not figure out the problem with the data you provided. I open the attached document and get the ' imported. I kindly ask you to start over and create a new issue for this very issue and close this one as it is takes to long to parse (and thus people won't look at it but skip to the next one). Please state: What you do (load the cvs, give the import options). What you actually get. What you expected to get. Please try to keep the attached test-cases (testdocuments) as simple as possible. In the current case you use a series of nested quotes that makes it difficult for an outsider to guess what you're trying to get. I agree with you that the import is not what one would expect and not equivalent of inputting it directly (format a cell as text, then enter Â'bla will end up in Â'bla (with the '). When having Â"'bla" in a csv and choosing " as text-delimiter one could expect the cell to be formatted as text (because of the text-delimiter) and thus get the same Â'bla but the import doesn't set a format - the cell will still be formatted with standard format thus you only get Âbla just like when you entered the text the first time. When you set the column to "Text" on import, then the format is changed to "Text" any you'll get the leading ' and will get the same text back on export. So the question is: Should be cvs-contents formatted with Text-format when it appears in the text-delimiters? Anyway - I'll close this one as invalid since it takes an enormous amount to parse this issue. Please file a new one with only the relevant information. (It is only in your interest to have an issue that can be read and understood in less than two minutes...) - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 --- Additional comments from [EMAIL PROTECTED] Mon May 2 19:26:20 -0700 2005 --- Firstly, thanks I now know where we are, I think I may even understand what you think 'one issue one issue report' means and will endeavour to comply. (probably by making feature requests.) Alan === first revisit how many issues this is for a moment. (pls ignore/skip to ===) It is your world, from now on, after this one, I will not add amy more comments to this issue re: anything other than ' inside "" unless asked to. In my view it is not reasonable to consider this issue piecemeal especially when I think one line of code could fix the whole issue. Hence I thought this is a bug fix rather than a feature request. I think the issue may however have moved focus, you say "Up to now it is a clear strategy to handle CSV content identical to input via the keyboard." In that case the bug is that when saving the csv file the data is not correctly reverse translated from text cell 'Here is my text' into "''Here is my text'" If in reading *and* writing csv (as you said) "CSV content identical to input via the keyboard" then surely by symmetry fields must be translated on writing into the text that would have to be inputed to produce this field. While that is a self consistent plan I would refrain from calling it csv. Perhaps that format is CSUI comma separated user input. === Now to the topic at hand. (repeats the above a bit I am afraid, but I did ask you to skip that bit as an aside.) I accept that it is possible to, decide that treating input from csv identically to user typed input is one strategy, and although it is not what I want today it is a strategy. In that case however I would expect that the process that output to csv mirrored this concept as far as is possible. Thus when a text cell, is output to a file, it would be printed out as the text that should be input to achieve the same result. Thus, a text cell would have a single ' prepended on output. (Dont do this it is a bad idea, which is why it is the reading code I claimed was faulty.) Consider the following user story. A User types ''Here is my text' into open office in cell a1. (first ' removed) cell a1 is text and contains 'Here is my text'. (all good so far) It is saved to file. (Sure on closing the document we get a warning that some information may have been lost. I expect formulas and all sorts of stuff to go, but I do expect it (OOo) to perform as well as the evil alternatives.) User Opens the csv file in vi shows "'here is my text'" as contents. Good thinks the User, there is my data. User Open the csv file in Open Office and the leading ' is missing. Hmm. Yes Open Office can read csv files, but it cant read the ones it wrote. In particular it deletes, ' inside "" reads in "1.0" as a numeric 1 Yes it happens with dates too type '23 may 2005 into a1 save as csv Look in vi Yep there it is as "23 may 2005". Load the csv file with, OOo and save as csv again (because you want to change some other field) and it has changed a1 to 23/05/2003. Yes if the whole column is text we can specify that in the GUI, each and every time we open the file. If OOo had the same file defintion for reading as writing csv then it would respect the "" surrounding any field and treat it as a text cell. It would communicate this intention to the GUI by prepending a ' (patch 1)(or through a modified interface patch 2) If OOo had the same file defintion for writing as reading csv (note order change) then when writing csv it would write down what a user should type in ,in order to get this cell contents. ie it would write down a leading ' inside the "". (note this is not an advocated feature and has real problems) As it appears this is not a bug, but perhaps a future requirement, I would suggest you (OO org) make it a priority. I think it is a serious issue when OOo is less compatable with the open csv standard than the evil propriatory alternative. (yes there is no official standard, but there is standard practise and there is the follwoign measure of merit.) OOo is less compatable because there are many fewer files that it can export to csv and then read back in and get the same content. If the evil alternative did this I would shout abuse. If and when this requirement is to be spec'd and made a feature I am prepared to put my neck on the line and contribute, and probably answer any complaints about what I think csv format is, or whether my code works as intended. (there is a rasonable chance I will have a local working version by then anyway. ) Permanent Contact Details. alan aiaware.com will (with the obvious change,insert @) when the server is fixed reach me. alan aiaware_nimda.hotpop.com is my domain contact and is getting spammed and will be moved as soon as I fix my email server. To
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User er changed the following: What|Old value |New value CC|''|'er' Assigned to|er|requirements Issue type|DEFECT|ENHANCEMENT Platform|PC|All --- Additional comments from [EMAIL PROTECTED] Mon May 2 05:27:31 -0700 2005 --- Note that this issue should only discuss the leading single quote, not other topics from above. Up to now it is a clear strategy to handle CSV content identical to input via the keyboard. If you don't want data to be interpreted you can always force a column to "Text" in the import dialog. If we changed this bit for the ' leading single quote, things would start getting confusing, the next one comes and says "I don't want dates being interpreted" or "I don't want formulas be recognized" or whatever. It should be noted however that MS-Excel does keep the single quote as content in this case, as opposed to how it handles keyboard input. Changing issue type to ENHANCEMENT and forwarding to "requirements" of User Experience for evaluation. Btw: the assumption that something in double quotes should always be treated as text doesn't hold true. See also http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm "Fields may always be delimited with double quotes". - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 --- Additional comments from [EMAIL PROTECTED] Fri Apr 29 01:40:12 -0700 2005 --- Note this is not part of my problem, my problem is drops leading ' inside "" when reading csv I have always found that code faults cluster and it is easiest to fix everything that is wrong with the localised piece of functionality all at once. Note OOo also interprets csv fields with leading '=' as special (the one liner also fixes that) eg ...,"=a1",... is read as a formula (That might make sense but formulas are not exported to csv that way.) This is actually a potentially good feature. IF ...,=a1,... is interpreted as a formula AND ...,"=a1",... is interpretd as text AND the GUI for export as CSV is given a check box to 'export formulae' THEN export csv with export formulae checked would write ...,=a1,... to the file export csv with export formulae NOT checked would write ...,"Contents of cell a1",... to the file (as it does now) I have in my time written rather a lot of robust CSV and related parsing IO code I could, if there was need, write a serious spec/defintion of CSV IO and provide a test set of data to thoroughly exercise the algorithm. Code that decides ' && = are special BOOL ScColumn::SetString( SCROW nRow, SCTAB nTab, const String& rString ) { ... if ( !bIsLoading ) { ...X... } ... if ( cFirstChar == '=' ) { ... } else if ( cFirstChar == '\'') ... } I suspect we/you cant mess easily with the code at ...X... because my bet is some of the other format importers probably depend on it. Looks like the code needs a good refactoring ... its already been patched. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User fst changed the following: What|Old value |New value Assigned to|spreadsheet |er Ever confirmed| |1 Status|UNCONFIRMED |NEW Target milestone|--- |OOo Later --- Additional comments from [EMAIL PROTECTED] Thu Apr 28 22:21:46 -0700 2005 --- Hi Eike, please have a look at this Issue and give us a short comment. Frank - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 --- Additional comments from [EMAIL PROTECTED] Thu Apr 28 09:33:05 -0700 2005 --- I have not yet compiled the code but inspection finds this code which from my reading shows the behaviours depicted by the examples. The line aCell.Append("'",1); //< Insert this will probably fix the symtoms aka patch 1 Changing the interface to pDoc to accept one more bool that is set true when this function parses a quoted "" text field would I think be a better solution but require more lines of code to change. pDoc->SetString( nCol, nRow, aRange.aStart.Tab(), aCell, bIsString ); aka patch 2. Code from impex.cxx BOOL ScImportExport::Text2Doc( SvStream& rStrm ) ... deleted ... while( *p ) { aCell.Erase(); if( *p == cStr ) { aCell.Append("'",1); //< Insert this p = lcl_ScanString( p, aCell, cStr, DQM_KEEP ); while( *p && *p != cSep ) p++; if( *p ) p++; } else { const sal_Unicode* q = p; while( *p && *p != cSep ) p++; aCell.Assign( q, p - q ); if( *p ) p++; } if (ValidCol(nCol) && ValidRow(nRow) ) { if( bSingle ) { if (nCol>nEndCol) nEndCol = nCol; if (nRow>nEndRow) nEndRow = nRow; } if( bData && nCol <= nEndCol && nRow <= nEndRow ) pDoc->SetString( nCol, nRow, aRange.aStart.Tab(), aCell ); } ... - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User alanchristiansen changed the following: What|Old value |New value Status|CLOSED|UNCONFIRMED Resolution|INVALID | --- Additional comments from [EMAIL PROTECTED] Thu Apr 28 07:37:21 -0700 2005 --- I believe that this report is valid and addresses one problem. The problem is drops leading ' inside "" when reading csv The included file demostrates this property. The ... in the body of the text demostrates this property. In attempting to produce definitive examples by black box testing I found several other characteristics of the software, that I really do believe are the same problem, where 'problem' is defined as 1 fault in the code needing remedy. Assuming std model view controller terminology. There will be two modules inside the code, one responsible for parsing CSV and one for the 'model' of the spreadsheet. The interface from the control (GUI) to the model uses one method to specify that a cell is text. It probably does this implicitly by just passing the string and if the string starts with ' it means it is a text cell even if the contents look numeric. I believe you will find that the CSV reading code incorrectly uses that interface and hence fails to correctly comunicate its intentions to the model. I presented several alternative potential methods to fix this, the first made the CSV conform to the interface made for the GUI the second and I think I indicated the preferred (in my view) method which modifies the model interface to allow code to specify to the model explicitly if this cells contents are text. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User fst changed the following: What|Old value |New value Status|RESOLVED |CLOSED --- Additional comments from [EMAIL PROTECTED] Thu Apr 28 01:05:18 -0700 2005 --- closed invalid - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User fst changed the following: What|Old value |New value Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Additional comments from [EMAIL PROTECTED] Thu Apr 28 01:04:51 -0700 2005 --- Hi Alan, thanks for your help, but *never* place more than one problem in a single Issue ! As this Issue doesn't follow the guidelines, I will close it as invalid. Please use the latest developer build to test your problems again and submit one problem in one Issue. Thanks for your understanding. Frank - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 --- Additional comments from [EMAIL PROTECTED] Thu Apr 28 00:14:21 -0700 2005 --- Hmmm. I was very sure that I got OO on reading ...,"Foo" "Bar",... to imagine a comma between them, but the test file I have sent you instead totally ignores "Bar" but as I said I consider this to be an invalid CSV file, and so the only issue might be that perhaps Open Office should complain rather than silently ignore the "Bar" in the input file. YMMV Alan - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sc-issues] [Issue 48335] drops leading ' inside "" when reading csv
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=48335 User alanchristiansen changed the following: What|Old value |New value Attachment data| |Created an attachment | |(id=25589) Example file | |that loads, badly, pls see | |additional comments --- Additional comments from [EMAIL PROTECTED] Thu Apr 28 00:10:24 -0700 2005 --- Created an attachment (id=25589) Example file that loads, badly, pls see additional comments - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]