Insert → Sheet from file → Type → Text CSVĮdit → Paste Special → Unformatted text (when the clipboard contains at least two lines of text) I wonder how OpenOffice macro developers overcome this problem.Ī similar Text Import dialog is used in three situations in addition to Text to Columns in the Data menu. I have googled a lot to find a solution and failed. I did not expect such a simple paste procedure will be a herculeous task in Calc. The data inside the Grid/Browser sometimes may be huge and after having several tests, I have found that copying the Grid/Browser content to clipboard, and then copying data from clipboard to Calc/Excel makes the transfer much much faster.Īs you said, now I have to compromise the speed at which the data get transfered to excel and find out a solution to read the conents of Grid/Browser one by one and write to Calc. I wanted to extend this service to OpenOffice Calc also. In my application I have a Data Grid/Browser where I have given my users a choice to transfer the Grid/Browser data to MS Excel. I am not using macro but using Direct API calls from xHarbour+FiveWin. Could your problem be solved by by importing the source file into Calc using direct API commands, rather than a recorded macro that uses Dispatcher calls? Even if you don't need the whole file, it might be easier to import it all and filter or sort it in Calc, rather than copy part of it to the clipboard and find a way around the dialog.Ĭould your problem be solved by by importing the source file into Calc using direct API commands, rather than a recorded macro that uses Dispatcher calls? Even if you don't need the whole file, it might be easier to import it all and filter or sort it in Calc, rather than copy part of it to the clipboard and find a way around the dialog. If someone can provide a specific location for PropertyValues associated with particular Dispatcher calls, that would be great. I have never found a list of what PropertyValues are available for what Dispatcher functions, so, though I agree that the right choice might solve the problem, I don't know a way to determine those settings. Code could be written to parse that into cells, but that amounts to recreating the import function and is way more work than seems reasonable. I can get direct access to the clipboard when in contains tab delimited data, but only as a text string. I worked on this for a while last night and today and I can't find a way to avoid the dialog. ![]() (Obviously a clever way to respond to the box from calc would be equally satisfactory - I could catch it with an autohotkey script I run but would prefer to keep it within the generating application if possible.) So, my question is: Is there a cleverer way of pasting the text from the clipboard directly into 7x2 cells without a box requiring user intervention? ![]() The code generating this paste special command is:ĭim args1(0) as new .PropertyValueĭispatcher.executeDispatch(document, ".uno:PasteSpecial", "", 0, args1()) The problem is that I've created a macro (just by recording the functions then editing to tidy it up) but the Text Import box comes up outside of the control of the macro which needs user input. In calc paste is refused so I have to use paste special and then select unformatted text and then click ok in the next box. In excel I could paste them directly in and used the paste function in the macro. I copy from another application a 7 column by 2 row set of numbers (tab separated when i paste them into NP++) I am moving from MS Office to Open Office so I'm getting a few surprises.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |