sc to csv konverter

Fórumok

Egyre jobban tetszik az sc, mint táblázatkezelő szuper program. Valahogy a lotus123 programra emlékeztet, de erős a tájszólása ahhoz képest. Előnye, hogy a kimeneti fájl BASH-ban szerkeszthető.

Csakhogy ha formulákkal tarkítom és a kimenetben a kiszámított értéket akarom tovább feldolgozni egy hatalmas táblázatban, akkor befonhatom a hajamat, mert nincsenek lehetőségeim.
Vagy mégis?

Ismer valaki olyan konvertert, ami képes az sc kimentett fájljait mondjuk csv-be menteni?

Hozzászólások

Sajnos nem, sőt rövid keresés se segített, mert csak az ellenkező irányú találatot kaptam (pl: CSV Utilities). De talán valahogy fel lehetne makrózni. (Ezt a linket ismerted?

Nem ismerem az sc-t de az előző kommentben levő linken azt írják, hogy az sc és az Xspread egy file formátumot használnak. Máshol mondjuk azt írják, hogy az Xspread tulajdonképpen egy grafikus felület az sc-hez. A lényeg úgyis csak az, hogy a reference manual-ja szerint az Xspread-ből lehet csv-be exportálni. Mint ahogy a Gnumeric is ismeri mind a csv mind a Xspread fájlformátumot.

-Mr-

Nem ismertem a fenti linket, de a manualnál szebben le vínnak írva a gyorsbillentyűk, baba az oldal. Az sc grafikus héjáról sem hallottam. Megnézem azt is, de a parancssoros szebben hangzik, nem kell grafikus héj...
Megnézem az x-est és elmélkedem egy kicsit.

Ez meg már tényleg majdnem lotus123:

http://hpux.connect.org.uk/ftp/hpux/X11/Misc/xspread-3.1.1/xspread.gif

Itt leltem rá, egyelőre fordítással bajlódom:
http://hpux.connect.org.uk/hppd/hpux/X11/Misc/xspread-3.1.1/

---
--- A gond akkor van, ha látszólag minden működik. ---
---

ÁÁÁÁÁÁÁ!!!

root[xspread-3.1.1]# xmkmf
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
root[xspread-3.1.1]# make
gcc -m32 -O2 -fno-strength-reduce -fno-strict-aliasing -I/usr/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNO_MESSAGE_CATALOG -DFUNCPROTO=15 -DNARROWPROTO -c -o interp.o interp.c
In file included from interp.c:14:0:
config.h:3:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SC_FONT’
In file included from interp.c:16:0:
/usr/local/include/sys/types.h:34:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘u_char’
interp.c: In function ‘dostindex’:
interp.c:299:28: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c:300:9: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c: In function ‘dodts’:
interp.c:611:8: warning: assignment makes pointer from integer without a cast
interp.c:613:11: error: dereferencing pointer to incomplete type
interp.c:620:31: error: dereferencing pointer to incomplete type
interp.c:621:9: warning: assignment makes pointer from integer without a cast
interp.c:623:11: error: dereferencing pointer to incomplete type
interp.c:625:31: error: dereferencing pointer to incomplete type
interp.c:626:9: warning: assignment makes pointer from integer without a cast
interp.c:628:11: error: dereferencing pointer to incomplete type
interp.c:628:25: error: dereferencing pointer to incomplete type
interp.c:628:39: error: dereferencing pointer to incomplete type
interp.c:628:52: error: dereferencing pointer to incomplete type
interp.c:629:14: error: dereferencing pointer to incomplete type
interp.c:629:44: error: dereferencing pointer to incomplete type
interp.c:630:8: error: dereferencing pointer to incomplete type
interp.c:630:29: error: dereferencing pointer to incomplete type
interp.c: In function ‘dotime’:
interp.c:654:19: error: storage size of ‘tm_cache’ isn’t known
interp.c:663:9: warning: assignment makes pointer from integer without a cast
interp.c:664:17: error: dereferencing pointer to incomplete type
interp.c: In function ‘getent’:
interp.c:746:20: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘docat’:
interp.c:1067:30: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c:1068:12: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c:1069:12: warning: incompatible implicit declaration of built-in function ‘strcat’
interp.c: In function ‘dodate’:
interp.c:1084:8: warning: assignment makes pointer from integer without a cast
interp.c:1087:12: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c: In function ‘dofmt’:
interp.c:1103:30: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c:1104:12: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c: In function ‘doext’:
interp.c:1182:16: warning: incompatible implicit declaration of built-in function ‘strchr’
interp.c:1185:11: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c:1189:14: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c:1198:10: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c:1198:41: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘dosval’:
interp.c:1222:13: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c:1222:44: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘dosubstr’:
interp.c:1242:20: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘seval’:
interp.c:1334:42: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c:1335:15: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c: In function ‘format_cell’:
interp.c:2192:15: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c:2192:43: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘label’:
interp.c:2315:39: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c:2316:13: warning: incompatible implicit declaration of built-in function ‘strcpy’
interp.c: In function ‘decodev’:
interp.c:2343:13: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘decompile’:
interp.c:2411:15: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘range_arg’:
interp.c:2595:13: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘editfmt’:
interp.c:2613:12: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘editv’:
interp.c:2625:15: warning: incompatible implicit declaration of built-in function ‘strlen’
interp.c: In function ‘edits’:
interp.c:2658:15: warning: incompatible implicit declaration of built-in function ‘strlen’
make: *** [interp.o] Error 1
root[xspread-3.1.1]#

...holnap folytatom.

---
--- A gond akkor van, ha látszólag minden működik. ---
---

Hát a HP porting center oldalán valószínűleg HP-UX binárisok vannak, nála meg a fordítási opciók szerint i386-os Linux fut :-) De azonban pláne sőt a FreeBSD saját distfile gyűjteményében van egy talán picikét frissebb verzió: 3.1.1c ha esetleg érdekel valakit. (A FreeBSD ports-ban is az szerepel, hogy megszűnt a master site, azért őrzik a saját repoban.)

Amúgy az sc 7.16-nál jár (vagy tán még újabb is van), míg az xspread a 6.22-es sc-ből készült, szóval számíthatsz különbségekre.

most veszem csak észre, hogy imake nálam nincs.

root[xspread-3.1.1c.orig]# xmkmf
imake -DUseInstalled -I/usr/lib/X11/config
imake: No such file or directory
imake: No description file.
Stop.
root[xspread-3.1.1c.orig]#

előkotrom...
...és:

root[xspread-3.1.1c.orig]# ./configure
loading cache ./config.cache
checking for bison... (cached) bison -y
checking for gcc... (cached) gcc
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking whether ln -s works... (cached) yes
checking whether make sets ${MAKE}... (cached) yes
checking for less... (cached) /usr/bin/less
checking for crypt... no
checking for des... no
checking for -lcurses... (cached) yes
checking for -ltermlib... (cached) no
checking for -ltermcap... (cached) yes
checking for -lgen... (cached) no
checking for -lintl... (cached) no
checking for -lPW... (cached) no
checking for -lm... (cached) yes
checking for -lieee... (cached) yes
checking for working terminal libraries... using -lcurses
checking how to run the C preprocessor... (cached) gcc -E
checking whether cross-compiling... (cached) no
checking for ANSI C header files... (cached) yes
checking for ctype.h... (cached) yes
checking for fcntl.h... (cached) yes
checking for limits.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/file.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for sys/ptem.h... (cached) no
checking for sys/stream.h... (cached) no
checking for sys/time.h... (cached) yes
checking for time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for X11 headers and libraries
checking for -ldnet... (cached) yes
(adding -ldnet to wlibs)
checking for -lsocket... (cached) no
checking for -lnsl... (cached) yes
(adding -lnsl to wlibs)
checking for X11/X.h... (cached) yes
checking for working const... (cached) yes
checking for size_t... (cached) yes
checking for st_blksize in struct stat... (cached) yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking whether gcc needs -traditional... (cached) no
checking return type of signal handlers... (cached) void
checking for strchr... (cached) yes
checking for memcpy... (cached) yes
checking for re_comp... (cached) yes
checking for regcmp... (cached) no
checking for regcomp... (cached) yes
checking for rint... (cached) yes
checking for pow10... (cached) yes
checking for fmod... (cached) yes
checking for fixterm... (cached) no
checking for idlok... (cached) yes
checking for keypad... (cached) yes
checking for notimeout... (cached) yes
checking for reset_prog_mode... (cached) yes
checking for reset_term_mode... (cached) no
checking for resetterm... (cached) no
creating ./config.status
creating Makefile
creating config.h
config.h is unchanged

root[xspread-3.1.1c.orig]# make
CONFIG_FILES= CONFIG_HEADERS=config.h:config_h.in ./config.status
creating config.h
config.h is unchanged
echo timestamp >stamp-h
rm -f xspread
gcc -o xspread cmds.o color.o crypt.o format.o graphic_main.o help.o interp.o matrix.o plot_XY.o plot_bar.o plot_line.o plot_pie.o plot_stk_bar.o range.o sc.o scXstuff.o screen.o search.o sort.o utils.o version.o vi.o vmtbl.o xmalloc.o gram.o lex.o -ltermcap -lieee -lm -lcurses -ldnet -lnsl -lX11
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../i486-slackware-linux/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in interp.o
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [xspread] Error 1
root[xspread-3.1.1c.orig]#

libcé? ezzel mindig bajom vót, de csak aberrált helyzetben.

---
--- A gond akkor van, ha látszólag minden működik. ---
---

Salix-Slackware lunixot haszálok.
A binárisat nem tudtam használni, mert olyan tömörítőcuccal tömörödött, amit az életben nem használtam, így vetemedtem a fordításra.
Csak este már fáradt voltam.
Ma lehet, hogy lesz egy kis időm

Modjuk épp ezzel szórakozom:
http://archive.debian.net/source/slink/xspread
sajnos debianforrás.

Ez sem megy:
http://mirrors.dotsrc.org/slackware/slackware-2.1/source/xap/xspread/

Ez sem nem:
http://ftp8.de.freebsd.org/pub/comp/Linux/slackware/slackware-7.1/sourc…

Most megyek és teletolom magam kávéval.

---
--- A gond akkor van, ha látszólag minden működik. ---
---

Macrocalc!!!

http://www.freakout.de/#mc

atom.

alapértelmezettként /usr/arx könyvtárba tolja a cuccost, holnap megnézegetem. Ha kiváltja itt nekem az sc-t, ezt fogom kedvelni.

Na meg a többi is itt van:
http://www.cs.umd.edu/class/spring2002/cmsc434-0101/MUIseum/application…

---
--- A gond akkor van, ha látszólag minden működik. ---
---

mc.
És a rendes mc-m akkor mit tesz?
Symlinkeltem 123 néven. Ez a kis program eléggé elfuserált, vagy csak én látom így?
Cellákat adtam össze, és a #sum(a1..a5) -re csak akkor számolt értéket, ha F2-vel ráfrissítettem a formulára. Ez a lotus123-nál nem így volt, ott minden egyes formula újraszámolta önmagát, amikor egyik érték megváltozott.
Na ezt szépen leírtam...

---
--- A gond akkor van, ha látszólag minden működik. ---
---

No szóval: nem tökéletes a dolog, de szerintem valami ilyesmi kell neked.

$ vi ~/.scrc
set tblstyle=0
plugout "csv" = "csvplugout"

$ vi ~/.sc/plugins/csvplugout
#!/bin/sh
exec tr : ,

$ chmod a+x ~/.sc/plugins/csvplugout

(és menteni a T paranccsal kell, nem a gyári P -vel.)
Most ez így csak közelítőleg jó, de ennek valami olyasmi lenne az az eredménye, amit szeretnél - ha jól értem. A tblstyle=0 (ami a default, tehát el is hagyható), alapból majdnem CSV-t csinál, csak éppen ":" van a "," helyett. Tehát neked már csak annyi a dolgod, hogy a kimentett fájlban a ":" karaktert lecseréled "," -re. Nyilván akkor bukik a dolog, ha nem csak számok, hanem olyan szövegek is vannak a mentett anyagban - amelyekben van : - ezt megnéztem, és már maga az sc nem jól kezeli, azaz semmilyen módon nem "takarja".