* exporting from emacs to excel
@ 2009-01-14 11:13 rustom
2009-01-14 12:42 ` Paul R
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: rustom @ 2009-01-14 11:13 UTC (permalink / raw)
To: help-gnu-emacs
I want to write a bit of elisp to take a file/buffer in org-mode and
export the tables to an excel sheet.
I know (very little) of how to write the code to make an excel sheet
from wscript. eg
giving wscript the following, opens a blank excel sheet:
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Add
objExcel.Visible = True
Is there some easy/natural way to get this functionality inside elisp?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting from emacs to excel
2009-01-14 11:13 exporting from emacs to excel rustom
@ 2009-01-14 12:42 ` Paul R
2009-01-14 20:12 ` Colin S. Miller
2009-01-14 20:21 ` Xah Lee
2 siblings, 0 replies; 5+ messages in thread
From: Paul R @ 2009-01-14 12:42 UTC (permalink / raw)
To: help-gnu-emacs
rustom> I want to write a bit of elisp to take a file/buffer in org-mode
rustom> and export the tables to an excel sheet.
You can maybe export as Coma Separated Values, then import into your
spreadsheet software.
Also, some high quality free spreadsheets are available for use. Check
OpenOffice Calc and Gnumeric.
--
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting from emacs to excel
2009-01-14 11:13 exporting from emacs to excel rustom
2009-01-14 12:42 ` Paul R
@ 2009-01-14 20:12 ` Colin S. Miller
2009-01-14 20:21 ` Xah Lee
2 siblings, 0 replies; 5+ messages in thread
From: Colin S. Miller @ 2009-01-14 20:12 UTC (permalink / raw)
To: help-gnu-emacs
rustom wrote:
> I want to write a bit of elisp to take a file/buffer in org-mode and
> export the tables to an excel sheet.
>
> I know (very little) of how to write the code to make an excel sheet
> from wscript. eg
> giving wscript the following, opens a blank excel sheet:
>
> Set objExcel = CreateObject("Excel.Application")
> objExcel.Workbooks.Add
> objExcel.Visible = True
>
> Is there some easy/natural way to get this functionality inside elisp?
Rustom,
That is using DDE/OLE to control Excel. OLE (Object Linking and Embedding)
uses DDE (Dynamic Data Exchange) to send messages between the applications.
A very quick google reveled http://www.stat.uiowa.edu/~luke/xls/wxls/wxls/node12.html
You might want to use DDESpy (part of Visual Studio) to see what your VB app is sending to Excel.
However, that elisp module might not support enough of DDE to implement OLE.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting from emacs to excel
2009-01-14 11:13 exporting from emacs to excel rustom
2009-01-14 12:42 ` Paul R
2009-01-14 20:12 ` Colin S. Miller
@ 2009-01-14 20:21 ` Xah Lee
2009-01-15 6:56 ` rustom
2 siblings, 1 reply; 5+ messages in thread
From: Xah Lee @ 2009-01-14 20:21 UTC (permalink / raw)
To: help-gnu-emacs
On Jan 14, 3:13 am, rustom <rustompm...@gmail.com> wrote:
> I want to write a bit of elisp to take a file/buffer in org-mode and
> export the tables to an excel sheet.
>
> I know (very little) of how to write the code to make an excel sheet
> from wscript. eg
> giving wscript the following, opens a blank excel sheet:
>
> Set objExcel = CreateObject("Excel.Application")
> objExcel.Workbooks.Add
> objExcel.Visible = True
>
> Is there some easy/natural way to get this functionality inside elisp?
dont know what's wscript.
Wikipedia says http://en.wikipedia.org/wiki/Windows_Script_File
but if all you want is export some text formatted as some table in
emacs to excell, that's really easy elisp.
i dont use org-mode, so i'm not sure what format is its table. But
basically, a table is just text with special markers to indicate row
and column beginnings.
in ascii format, typically a row is just a line, and column are
delimited by comma. Typically known as csv format
http://en.wikipedia.org/wiki/Comma-separated_values
all app or spreadsheet that deals with table data can import and
export this format.
if you can give a concrete example of what your source format is, then
perhaps me or others can show you the elisp code. It's probably just a
10 min job.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: exporting from emacs to excel
2009-01-14 20:21 ` Xah Lee
@ 2009-01-15 6:56 ` rustom
0 siblings, 0 replies; 5+ messages in thread
From: rustom @ 2009-01-15 6:56 UTC (permalink / raw)
To: help-gnu-emacs
Thanks Colin, Paul, Xah for the comments and tips.
Here are some clarifications.
excel is not a choice its a given; emacs-org is the choice!
The context: Our organization has a web-based system for logging hours
which can be slow at times.
It has a facility to upload the hours in an xls format so thats where
the given comes from.
So csv also is not an option in itself except as a hopping point
between emacs and xls.
Assuming I use that hopping point the task breaks up into 3:
1. Write elisp code to scrape an org mode file containing hours
clocked (in a suitable format) and write it to a csv file (in a
corresponding format)
2. Write a wscript script to read in the csv into excel and write it
out as xls
3. Write a ??? script to upload the output of 2 to the server
Even if we ignore 3, I was seeing what it would take to combine 1 and
2 into a 'one-click' solution (rather one-M-x solution) that would
convert my org record into an xls file.
Xah: Ive not really thought about 1 (and perhaps the better place to
pursue it would be the org mode list). I will do that if the other
parts seem workable.
Colin: The link you sent seems to be some other lisp? Or does it work
in elisp?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-01-15 6:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 11:13 exporting from emacs to excel rustom
2009-01-14 12:42 ` Paul R
2009-01-14 20:12 ` Colin S. Miller
2009-01-14 20:21 ` Xah Lee
2009-01-15 6:56 ` rustom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).