Index: txtdb/txtdb.scm ================================================================== --- txtdb/txtdb.scm +++ txtdb/txtdb.scm @@ -110,23 +110,26 @@ (colnum-b (assoc b ref-colnums))) (if (and colnum-a colnum-b) (< (cadr colnum-a)(cadr colnum-b)) (if (and (string? a) (string? b)) - (string< a b)))))))))))) + (string< a b)))))))))) + (with-output-to-file (conc targdir "/sxml/" sheet-name ".sxml") + (lambda () + (pp remaining))))) (define (extract-txtdb dat targdir) (let* ((wrkbk (find-section dat 'http://www.gnumeric.org/v10.dtd:Workbook)) (wrk-rem (remove-section dat 'http://www.gnumeric.org/v10.dtd:Workbook)) (sheets (find-section wrkbk 'http://www.gnumeric.org/v10.dtd:Sheets)) (sht-rem (remove-section wrkbk 'http://www.gnumeric.org/v10.dtd:Sheets))) - (create-directory targdir) - (with-output-to-file (conc targdir "/workbook.sxml") + (create-directory (conc targdir "/sxml") #t) + (with-output-to-file (conc targdir "/sxml/workbook.sxml") (lambda () (pp wrk-rem))) - (with-output-to-file (conc targdir "/sheets.sxml") + (with-output-to-file (conc targdir "/sxml/sheets.sxml") (lambda () (pp sht-rem))) (for-each (lambda (sheet) (sheet->txtdb sheet targdir)) sheets)))