Jump to content

Lsp For find and replace the text with Excel (Or .txt file) input file


suryatry26

Recommended Posts

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    12

  • suryatry26

    10

  • BIGAL

    3

  • djkenmm

    3

  • 5 months later...
Guys, instead of selecting an excel file, how can i make it to search or load a specific excel file (with specific path) automatically

 

Just replace the codes that represents the dialog with your complete Excel file path and be careful to have two back slashes or one forward slash .

 

I mean this code:

(setq fl (.......))

 

With this uncomplete example as per your complete path:

 

(setq fl "C:\\......"))
or this:
(setq fl "C:/......."))

Link to comment
Share on other sites

Hi Tharwat,

Thanks for the quick response.

I dont know really how to deal with it, but i did try and i got bad argument when i execute the command.

 

 

(if (and (setq fl "U:/test/Book1.csv")
     )
   (progn
     (defun _parse:strings (string delimiter / pos lst)
;;; Parse a string to a list of strings    ;;;

Link to comment
Share on other sites

  • 3 years later...

Hi Tharwat,

what a brilliant lisp. works very well.

 

was just wondering if it is a simple change in code so the .csv file your lisp reads into cad can be a ,(comma) delimited file rather than a ; (semicolon) 

I have just used the find and replace command within a comma delimited file to date. was just thinking it might be a simple fix to streamline the command.

Thank You in advanced.

and thank you again for sharing knowledge.

Link to comment
Share on other sites

Not sure which bit of code you refer to but (defun _parse:strings (string delimiter / pos lst) the variable delimeter her can be what you choose so (_parse:string a,b,c,d,f ",")

Link to comment
Share on other sites

8 hours ago, CADSURVEY said:

Hi Tharwat,

what a brilliant lisp. works very well.

 

was just wondering if it is a simple change in code so the .csv file your lisp reads into cad can be a ,(comma) delimited file rather than a ; (semicolon) 

I have just used the find and replace command within a comma delimited file to date. was just thinking it might be a simple fix to streamline the command.

Thank You in advanced.

and thank you again for sharing knowledge.

 

Hi,

Thank you for the nice words and I am happy that my program worked for you.

Regarding to your question, so just replace the semicolon in the following codes to comma.

eg: ( ";" to be "," )

(_parse:strings st ";")

 

 

 

 

 

 

Link to comment
Share on other sites

  • 7 months later...
On ‎2‎/‎25‎/‎2015 at 5:13 PM, suryatry26 said:

Its Working Superb. Thanks a Lot..It Wont Work With MTEXT??? Possible to Include MTEXT?

can you pleas upload  CSV file ...

Link to comment
Share on other sites

On ‎2‎/‎25‎/‎2015 at 5:20 PM, Tharwat said:

 

Finally you got it working ! good for you ;)

You can add the Mtext objects , just add the following part as shown in red color .

 

 


'(0 . "TEXT[color=red],MTEXT[/color]")
 

 

hi!! can you please upload CSV file .......

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...