how to create excel sheet in flex

498 views
Skip to first unread message

kanu

unread,
Jul 17, 2007, 2:59:30 AM7/17/07
to Flex India Community
Is it possible to create a application as same as MS-Excel in flex?

mrinal wadhwa

unread,
Jul 17, 2007, 4:10:45 AM7/17/07
to flex_...@googlegroups.com
Kanu,

I have done this in the past ... it is based on the fact that excel can understand html .... do this ...
  1. parse through the grid rows and create a string the is nothing but an html representation of the datagrid in the form of an html <table>..... so a one row table would be like this  .......  <table><tr><td></td><td></td><td></td></table>
  2. save this as an xls .... when you open this file in excel ... it should be a properly populated table.
If I have some time later i will post an example.

Thank you,
Mrinal

Bhuvan Gupta

unread,
Jul 17, 2007, 4:12:20 AM7/17/07
to flex_...@googlegroups.com

mrinal wadhwa

unread,
Jul 17, 2007, 4:30:29 AM7/17/07
to flex_...@googlegroups.com
Both our approaches are almost the same .. excel can read both csv and html ... the rest of it remains the same
 
Bhuvan, one advantage that may be there with html is that one could specify formatting information .. cell colors etc(although I have not tried that) ..... One thing that I have tried is putting the <th> tag for table headers ... which shows the headings of columns in bold in the generated xls
_
Mrinal
http://weblog.mrinalwadhwa.com

Anish Kumar

unread,
Jul 17, 2007, 4:02:16 AM7/17/07
to Flex India Community
hi kanu,

Its defineitly possible to create a application like MS-Excel in flex.
I think Flex has all (or all most all) capabilities required for
building a MS-Excel class of app. But for sure the amount of work load
required to build a flex app with MS-Excel kind of quality will be
HUGE.

But if you are just looking at ways to communicate between MS-Excel
and Flex, you can have a look at this:-
http://yakovfain.javadevelopersjournal.com/weve_taught__adobe_flex_to_talk_to_microsoft__excel.htm
and the demo app can be found at
http://samples.faratasystems.com/export2excel/FxSpreadSheet.html

regards,
-Anish Kumar

mrinal wadhwa

unread,
Jul 17, 2007, 4:36:15 AM7/17/07
to flex_...@googlegroups.com
Ooops!!! .... I got Kanu's question all wrong ... she wants to create an Excel like app not an .xls file.... sure you can do that ... but excel is a very elaborate application with mammoth capabilities ...  It will  take a lot of time .. but i think you can do it all in Flex ..... maybe even add some cool stuff that excel doesn't have.

kanu

unread,
Jul 17, 2007, 4:43:51 AM7/17/07
to Flex India Community
Is there's any sample application or any hint so that i can have an
idea that what would be the approach of doing this.

On Jul 17, 1:36 pm, "mrinal wadhwa" <mrinal.wad...@gmail.com> wrote:
> Ooops!!! .... I got Kanu's question all wrong ... she wants to create an
> Excel like app not an .xls file.... sure you can do that ... but excel is a
> very elaborate application with mammoth capabilities ... It will take a
> lot of time .. but i think you can do it all in Flex ..... maybe even add
> some cool stuff that excel doesn't have.
>

> On 7/17/07, Anish Kumar <anishkuma...@gmail.com> wrote:
>
>
>
>
>
> > hi kanu,
>
> > Its defineitly possible to create a application like MS-Excel in flex.
> > I think Flex has all (or all most all) capabilities required for
> > building a MS-Excel class of app. But for sure the amount of work load
> > required to build a flex app with MS-Excel kind of quality will be
> > HUGE.
>
> > But if you are just looking at ways to communicate between MS-Excel
> > and Flex, you can have a look at this:-
>

> >http://yakovfain.javadevelopersjournal.com/weve_taught__adobe_flex_to...


> > and the demo app can be found at
> >http://samples.faratasystems.com/export2excel/FxSpreadSheet.html
>
> > regards,
> > -Anish Kumar
>
> > On Jul 17, 11:59 am, kanu <kanukukr...@gmail.com> wrote:

> > > Is it possible to create a application as same as MS-Excel in flex?- Hide quoted text -
>
> - Show quoted text -

kanu

unread,
Jul 17, 2007, 6:28:14 AM7/17/07
to Flex India Community
Anish this is the sample i was looking for.

Thnx alot
if there is any other then please don't forget to mention

Thanx in advance
Regards
Kanu Kukreja

On Jul 17, 1:02 pm, Anish Kumar <anishkuma...@gmail.com> wrote:
> hi kanu,
>
> Its defineitly possible to create a application like MS-Excel in flex.
> I think Flex has all (or all most all) capabilities required for
> building a MS-Excel class of app. But for sure the amount of work load
> required to build a flex app with MS-Excel kind of quality will be
> HUGE.
>
> But if you are just looking at ways to communicate between MS-Excel

> and Flex, you can have a look at this:-http://yakovfain.javadevelopersjournal.com/weve_taught__adobe_flex_to...
> and the demo app can be found athttp://samples.faratasystems.com/export2excel/FxSpreadSheet.html


>
> regards,
> -Anish Kumar
>
> On Jul 17, 11:59 am, kanu <kanukukr...@gmail.com> wrote:
>
>
>

kanu

unread,
Jul 17, 2007, 6:50:53 AM7/17/07
to Flex India Community
Anish in this example they are embedding an excel sheet in flex but
what if i don't have MS-Office in my system, then i don't think it'll
work.
dats y i need to create my own excel sheet application...

> > - Show quoted text -- Hide quoted text -

Anish Kumar

unread,
Jul 17, 2007, 7:17:51 AM7/17/07
to Flex India Community
Hi Kanu,

i saw ur request for the book "RIA with Flex and Java" on the authors
website. I think you should post a similar request here on "Flex
books: India wish list" (http://groups.google.com/group/flex_india/
browse_thread/thread/da4470027c15d7a4/3d33d55aca25bd80?lnk=gst&q=book
+john&rnum=6#3d33d55aca25bd80)

Btw till you wait for the author to reply your query, may be you can
start learning how to use "Microsoft Office Web Components". The
example pulls data from a flex app and sends it to a MS excel thru
Microsoft Office Web Components (OWC). Here is a nice tutorial on how
to use "Microsoft Office Web Components"
http://www.aspfree.com/c/a/Microsoft-Access/Creating-Data-Access-Pages-with-Charts-using-Office-Web-Components/

the above tutorial will provide you an idea to getting started with
OWC and if you google for OWC you will get more useful informations.

Hope it helps.

regards,
-Anish Kumar

kanu

unread,
Jul 17, 2007, 7:31:18 AM7/17/07
to Flex India Community
Anish i don't want that.
this application would work only if MS-office is installed on my
system otherwise not...
And i need to create an excelsheet which i can open even i don't have
office in my system :(

On Jul 17, 4:17 pm, Anish Kumar <anishkuma...@gmail.com> wrote:
> Hi Kanu,
>
> i saw ur request for the book "RIA with Flex and Java" on the authors
> website. I think you should post a similar request here on "Flex
> books: India wish list" (http://groups.google.com/group/flex_india/
> browse_thread/thread/da4470027c15d7a4/3d33d55aca25bd80?lnk=gst&q=book
> +john&rnum=6#3d33d55aca25bd80)
>
> Btw till you wait for the author to reply your query, may be you can
> start learning how to use "Microsoft Office Web Components". The
> example pulls data from a flex app and sends it to a MS excel thru
> Microsoft Office Web Components (OWC). Here is a nice tutorial on how

> to use "Microsoft Office Web Components"http://www.aspfree.com/c/a/Microsoft-Access/Creating-Data-Access-Page...

> > > - Show quoted text -- Hide quoted text -

Bhasker V Kode

unread,
Jul 18, 2007, 2:37:07 AM7/18/07
to flex_...@googlegroups.com
Try this ,i created this for barcamp bangalore two days ago. i've called it excel koder and it's meant to export excel data to html and wikiText . In my example ,i'm asking you to copy you data from excel and paste  it into my textarea. i'm not how sure you can customize this ,but i'm sure its possible. ( such as reading the html intor ur flex app and rendering it there in a way that looks like excel or a data grid like )
 
 
You might want to even check out http://mannu.livejournal.com/348299.html . I wonder if the author of that blog is on this list ! could be 8 )
 
Keep Clicking,
Bhasker V Kode
 
Warning : my solution - excelkoder , is a 100% javascript /DHTML based sollution 8 )


 
On 7/17/07, kanu <kanuk...@gmail.com> wrote:

Anish i don't want that.
this application would work only if MS-office is installed on my
system otherwise not...
And i need to create an excelsheet which i can open even i don't have
office in my system :(

On Jul 17, 4:17 pm, Anish Kumar <anishkuma...@gmail.com> wrote:
> Hi Kanu,
>
> i saw ur request for the book "RIA with Flex and Java" on the authors
> website. I think you should post a similar request here on "Flex
> books: India wish list" ( http://groups.google.com/group/flex_india/

Anish Kumar

unread,
Jul 18, 2007, 2:47:49 AM7/18/07
to Flex India Community

The Class: Excel XML Parser scans an excel sheet and returns its data
as an XML file which you can always use to feed to your Flex app. But
this approach has its limitation in that you need to use PHP (not sure
whether you have worked with PHP earlier). Without OWC, I think
parsing the excel sheet is only the way out for your problem.

regards,
-Anish Kumar

On Jul 18, 11:37 am, "Bhasker V Kode" <bhaske...@gmail.com> wrote:
> Try this ,i created this for barcamp bangalore two days ago. i've called it
> excel koder and it's meant to export excel data to html and wikiText . In my
> example ,i'm asking you to copy you data from excel and paste it into my
> textarea. i'm not how sure you can customize this ,but i'm sure its
> possible. ( such as reading the html intor ur flex app and rendering it
> there in a way that looks like excel or a data grid like )
>
> http://bhaskervk.com/js/excelkoder/
>
> You might want to even check outhttp://mannu.livejournal.com/348299.html.
> I wonder if the author of that blog is on this list ! could be 8 )
>
> Keep Clicking,

> Bhasker V Kodehttp://bosky101.blogspot.com


>
> Warning : my solution - excelkoder , is a 100% javascript /DHTML based
> sollution 8 )
>

> On 7/17/07, kanu <kanukukr...@gmail.com> wrote:
>
>
>
> > Anish i don't want that.
> > this application would work only if MS-office is installed on my
> > system otherwise not...
> > And i need to create an excelsheet which i can open even i don't have
> > office in my system :(
>
> > On Jul 17, 4:17 pm, Anish Kumar <anishkuma...@gmail.com> wrote:
> > > Hi Kanu,
>
> > > i saw ur request for the book "RIA with Flex and Java" on the authors
> > > website. I think you should post a similar request here on "Flex

> > > books: India wish list" (http://groups.google.com/group/flex_india/

Anish Kumar

unread,
Jul 18, 2007, 3:26:28 AM7/18/07
to Flex India Community
sry the earlier post didnt have the full message....i donno why it was
truncated...here i am reposting it again............


If OWC is not the right option for you, then I think you should use
some excel parser to get the data may be in some xml format and then
feed the xml to you flex app. This excel parsing can be done using PHP
server side script. You will find a very useful utility for achieving
this parsing with PHP here
http://www.phpclasses.org/browse/package/3187.html

The Class: Excel XML Parser scans an excel sheet and returns its data
as an XML file which you can always use to feed to your Flex app. But
this approach has its limitation in that you need to use PHP (not sure
whether you have worked with PHP earlier). Without OWC, I think
parsing the excel sheet is only the way out for your problem.

regards,
-Anish Kumar

Reply all
Reply to author
Forward
0 new messages