sorry.. I'm not much help there. I've never used .XLL files, and I'm HEAVILY into VBA... Perhaps someone else can give you the help you need.
BTW: What version of Excel are you using? Paul ________________________________ From: Hemant Hegde <hemantbales...@gmail.com> To: excel-macros@googlegroups.com Sent: Thu, November 12, 2009 1:40:43 PM Subject: Re: $$Excel-Macros$$ Re: Store Cell formatting Hi Paul Thank you for the suggestion. Whenever I have to format a sheet which requires complex formatting, I will always keep a hidden sheet which is already formatted. I will copy the default formatting (and also formulae) from the hidden sheet and paste it on the target sheet using "ActiveSheet.paste" and it is very quick. But in spite of that, the macro has to do a number of iterations (something like 2000*300) and it is very slow! Hidden sheet templates are already inter-linked to each other and contain a complex array of formulae (I have used them to decide which rows are to be deleted and which to be retained) We can easily guess why excel takes so much time when we are deleting/inserting rows. It has to update all the formulae in the workbook as the CELL ADDRESS CHANGES when we delete/insert a row (it does that even when calculation is set to XlManual and AS and WHEN we delete a row) I don't think simulation of a spreadsheet using code to accomplish this is feasible solution as im sure its going to be too complex. The only way to do this could be to use *.XLL files as these are already compiled and as fast as excel's built in functions. Where on the net can I get examples (open code of course) of working *.XLL files? If you know it yourself and want to help me, It will be very very nice and I will be grateful to you for the help.. thanking you Hemant Hegde 2009/11/12 Paul Schreiner <schreiner_p...@att.net> I'm not sure of any other ways, but one piece of advice: > >Determine what the "default" formatting is for the sheet. >Save the "default" once. >then, check the cells against the default. >Only save those that DIFFER from the default >(or perhaps only the features that are different) > >that way, when you restore the document, >you first set the defaults for the sheet, then only process the differences. > >Paul > > > > ________________________________ From: Hemant Hegde <hemantbales...@gmail.com> > >To: excel-macros@googlegroups.com >Sent: Wed, November 11, 2009 10:55:41 AM >Subject: $$Excel-Macros$$ Re: Store Cell formatting > > > >Hi > >Thank you Paul and RolfJ > >The file I want to save in binary format already contains 4 ararys of variable >size (these are to store: the file version info, settings and user >preferences, main data, and other data) > >The excel formatting I and values I am trying to save is just a part of the >above said file. I dont want to create two files (one myformat.svi and >another, excel.xls) but to include it in the same file. > >Furthermore I want the file to be as small as possible because the data to be >save can be accounting transactions data which can run into any length... > >If I am able to convert different combinations (there wont be many) of cell >formatting into a number (preferably between 0 - 255 so that i can store that >as a Byte) It would make my file smaller than excel's own format. > >What I mean by different combinations is: > >a Byte with value 0 may mean [ Font color=Black, Backgroung color=white, >Bold=False, Font ="Arial"] and > >a Byte with value 1 may mean [ Font color=Red, Backgroung color=white, >Bold=True Font ="Arial"] and > >and so on untill its 255 and I think more combinations wont be required. > > >Another important reason to do that is to avoid recalculation when the user >makes only a small change which affects only few values (or formatting) in the >final report.. > >I dont know if applying the cell formatting to each cell one after another >takes same [or more :( ! ] amount of time as a total recalculation!! > >It will be nice if you advice me if I can do it in some other way. I heard >"*.DLL" and *.XLL" files are faster? will these help? > >Thank You >Hemant Hegde > > >On 10/11/2009, RolfJ <r...@pacificsound.us> wrote: > >>Please explain why you don't save the worksheet resulting from your >>calculations in the intrinsic Excel format (i.e. as an Excel >>workbook). >> >>On Nov 8, 12:20 pm, Hemant Hegde <hemantbales...@gmail.com> wrote: >>> Hi >>> >>> After a lot of coding and lengthy calculations (takes up to 2 minutes) I get >>> a sheet (actually a report) with lot of numbers and different cell >>> formatting. >>> >>> Now I need to store the cell values together with cell formatting in a >>> binary file to avoid repeated lengthy calculations. >>> >>> The only option I able to think is to store all the formatting values one >>> after another in the binary file eg. For cell's background colour, I will >>> have to store the value of cells(1,1).interior.colorindex as a number and >>> write it to the binary file. While opening the binary file, it has to read >>> it and apply it back to the cell. >>> >>> Any better Idea? >>> >>> Im sorry if I failed to explain correctly what i want to do! >>> Can I get all the formatting of a cell as a single number or a string by any >>> means? >>> >>> Professional programmers help me please >>> >>> -- >>> Hemant Hegde >> >> >> > >--~--~---------~--~----~------------~-------~--~----~ >---------------------------------------------------------------------------------- > >Some important links for excel users: >1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at >http://www.excelitems.com >2. Excel tutorials at http://www.excel-macros.blogspot.com >3. Learn VBA Macros at http://www.vbamacros.blogspot.com >4. Excel Tips and Tricks at http://exceldailytip.blogspot.com > >To post to this group, send email to excel-macros@googlegroups.com >If you find any spam message in the group, please send an email to: >Ayush Jain @ jainayus...@gmail.com or >Ashish Jain @ 26may.1...@gmail.com ><><><><><><><><><><><><><><><><><><><><><><> >HELP US GROW !! > >We reach over 6,500 subscribers worldwide and receive many nice notes about >the learning and support from the group. Our goal is to have 10,000 >subscribers by the end of 2009. Let friends and co-workers know they can >subscribe to group at http://groups.google.com/group/excel-macros/subscribe >-~----------~----~----~----~------~----~------~--~--- > > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe