PASTECLIP from Chrome vs. Internet Explorer, no tab formatting in string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need users to copy a row of data from an Online Excel workbook. I have these users select the row, then copy, then return to AutoCAD and ultimately the copied data is pasted using "PASTECLIP". This works fine and, as expected, places an MText object into AutoCAD..
My issue arises by which BROWSER the user copies the data from.. Since I need to get data from multiple Columns, I use the pasted text to help recognize where columns start/end.
CHROME works great and inserts TAB characters as "\t" within the mtext.
INTERNET EXPLORER appears to NOT insert TAB characters and instead perhaps only inserts spaces " "?
From what I can tell, the ONLY way to tell where a column starts/ends is by searching (using AutoLISP/VisualLISP) the raw string for the "\t" characters.. So if users paste from Internet Explorer I appear to be out of luck? I cannot tell all users which browser of preference to use in this instance, so I am trying to have my code search for any way to recognize where columns start/end! Help!
Note:
- We CANNOT make the workbook local. It must be kept online and the users must copy the data from the online workbook.
EDIT:
- Using PASTESPEC provides 2 options "Unicode Text" & "Text" changing between the 2 returns the same results.
- Copying merely the exact cells (instead of the entire row) returns the same results.
I have created an online Excel Workbook with 1 Row / 3 Columns filled out. Here is an example of pasted data from the same online workbook. I have created an example where each cell has spaces in it since our data also may have this.
Returned command line from reading entities.. top one is IE, second is Chrome:
Command: (cdr (assoc 1 (entget (car (entsel))))) Select object: "THIS IS A1 THIS IS B1 THIS IS C1 \\P\\P" Command: (cdr (assoc 1 (entget (car (entsel))))) Select object: "THIS IS A1\tTHIS IS B1\tTHIS IS C1"
Also, you can see attached dwg.
Best,
~DD