RE: WritePro expression undefined
Tim! We have great support from 4D! (Erick) This is an effective 4D tech support work-around to the problem of “Undefined”. Here “WParea” is a 4D Write Pro object. After running this method on our converted 4D Write to 4D Write Pro documents, none of the embedded statements return “Undefined”. It wraps all embedded expressions in an ‘eval(“….”)’. I did not find “eval” as a 4D command, but it works! Off-Topic: Lastly, I must conceive a way to convert the embedded picts… //- C_OBJECT($range) C_LONGINT($start;$end;$i;$type) C_TEXT($text;$Newtext) WP SELECT(WParea;wk start text;wk end text) $range:=WP Get selection(WParea) $start:=OB Get($range;"start") $end:=OB Get($range;"end") ARRAY TEXT($methodArray;0) APPEND TO ARRAY($methodArray;"eval") SET ALLOWED METHODS($methodArray) For ($i;$start;$end) $type:=ST Get content type(*;"WParea";$i;$i) If ($type=2) // found expression $text:=ST Get expression($range;$i;$i) $text:=Replace string($text;"\"";"\\\"") $Newtext:="eval ("+"\""+$text+"\""+")" ST INSERT EXPRESSION(*;"WParea";$Newtext;$i;$i+1) End if End for //--- If you observe it, MERRY CHRISTMAS David Ringsmuth ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Pasting Spreadsheet Data into 4D Records
You're going to have to either save it as a text file (csv or tab-delimited) and then parse it, or use a plugin (such as Pluggers' XL Plugin) to read the spreadsheet directly. Pat On Mon, 24 Dec 2018 at 00:48, Alan Tilson via 4D_Tech <4d_tech@lists.4d.com> wrote: > Greetings everyone, > > Is there a way to copy from a spreadsheet like data source and to paste > directly into 4d while parsing it into table(s) and fields? I'm using v17 > if that matters. > > I thought about saving the data into a text file and then importing the > text file, but there seem to be unnecessary steps in there! > > Thanks, did some searches but didn't find anything, > Alan > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** -- * CatBase - Top Dog in Data Publishing tel: +44 (0) 207 118 7889 w: http://www.catbase.com skype: pat.bensky * ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Applying attributes to a WritePro table cell
I want to insert text and apply formatting to individual cells in a WP table. Here's my test code: $WPRange:=WP Create range(wpTablePreview;wk start text;wk end text) $WPTable:=WP Insert table($WPRange;wk replace;wk include in range;2;1) $cell:=WP Table get cells($WPTable;1;1) // column 1, row 1 WP SET TEXT($cell;"Body";wk replace) // gives error: "This kind of argument was not expected here" WP SET ATTRIBUTES($cell;wk background color;Blue) The table is drawn with two empty cells. The first cell should have a blue background, but it doesn't. What am I doing wrong? Pat -- * CatBase - Top Dog in Data Publishing tel: +44 (0) 207 118 7889 w: http://www.catbase.com skype: pat.bensky * ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Pasting Spreadsheet Data into 4D Records
Greetings everyone, Is there a way to copy from a spreadsheet like data source and to paste directly into 4d while parsing it into table(s) and fields? I'm using v17 if that matters. I thought about saving the data into a text file and then importing the text file, but there seem to be unnecessary steps in there! Thanks, did some searches but didn't find anything, Alan ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **