Skip to content

Commit

Permalink
[Enh]: Excel - CSV Export Linking
Browse files Browse the repository at this point in the history
  • Loading branch information
seandenigris committed Oct 11, 2023
1 parent f5d5afa commit 1cf7a00
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/ResourcesLive/RlExcelSpreadsheet.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,28 @@ RlExcelSpreadsheet class >> fileExtensions [
{ #category : #accessing }
RlExcelSpreadsheet >> csv [
self flag: 'must create manually for now. There was a SO thread about it formerly being possible via python and not much other info'.
^ RlResource on: self file withoutExtension, 'csv'.

^ self
propertyAt: #csv
ifAbsent: [ nil ].

"Possibly relevant to future auto-find feature:
xls file parent parent / 'RlCSV' / xls file base, 'csv'.
spreadsheets do: [ :xls |
(xls library tail last: 3)
detect: [ :cand | cand file base = xls file base ]
ifFound: [ :csv |
xls csv: csv.
csv propertyAt: #ExcelFile put: xls ] ]"
]

{ #category : #accessing }
RlExcelSpreadsheet >> csv: anRlResource [
"See getter comment"

^ self
propertyAt: #csv
putRemovingNil: anRlResource
]

{ #category : #accessing }
Expand Down

0 comments on commit 1cf7a00

Please sign in to comment.