=== FOR COMPLETENESS ===
What you need
Excel application : --> Microsoft Office
Giles code :------------> Help with export list to excel [ Not included as attachement, You need to do this your self]
Excel template file:----> REQUIRED LIST Template.xlsx [ refer to attached xlsx file ]
pBe's code : -----------> LevelsChainageAndCrossing.lsp [ refer to attached lsp file ]
Command: PSS
Select LEVELS and CHAINAGE
Select objects: Specify opposite corner: 22 found, 22 total
Select objects:
Select Crossings[Enter for none]
Select objects: Specify opposite corner: 2 found
< user is then prompted to save the collected values to an excel file >
("192+500.00" 222.17)
("192+540.23" 223.31)
("192+633.63" 227.11)
("192+702.03" 230.19)
("192+794.65" 232.9)
("192+848.27" 232.21)
("192+919.94" 228.53)
("192+994.92" 229.67)
("193+068.40" 230.77 "CART TRACK CH. 193+068.40")
("193+161.98" 229.42)
("193+225.75" 229.25 "440V POWER LINE 5.2M HEIGHT CH. 193+225.75")
Data saved : D:\Downloads\ALG Profile Data.xlsx
---------------------------------------------------------------------------------------
Notes:
Change xlsx template location according to your File and folder naming convention:
;;; Excel file Template location ;;;
(setq XcelTemplate "D:\\Downloads\\REQUIRED LIST Template.xlsx")
Comments: [ Layer filter can be added on the code by user ]
LAYERS : I cannot reitereate this enough. To identify which is what on a drawin, assign the proper layer. Autocad layers are there for a reason. Create a separate layer names for Chainage, Levels and Crossing TEXT objects.
HTH
Kudos to @_gile for the wicked gc:WriteExcel function