EmptyFiles_zip

I have built the ExportPDF sample program in XE2.   Every time I try to open an XLSX file, it fails with an exception "Resource EmptyFiles_zip not found".   I added the XlsAdapterResources.rc file to the project to fix this, but I can find no documentation about precisely when this file should be added, and it is not good that the project fails to work as shipped.

In addition the form for this sample project has the Scaled property set to true, so does not open correctly on my Win7 system with large fonts.  It needs tedious adjustment of all the panel sizes so that the rightmost fields are visible.

Hi,


Are you doing something special or changing anything when installing FlexCel or the demo? Building with runtime packages or any other change over the default? I've tried the demo here in a clean virtual machine and it works fine. I've tried it in 32 bit and 64 bit, and both configurations work fine. I've also looked inside the generated exe with a resource explorer, and EMPTYFILES_ZIP is there as an RCDATA resource.

 I haven't either got any other feedback about this, and as this is basic functionality (without emptyfiles.zip you won't be able to do much in FlexCel), I would have expected to have like a hundred emails already about this. So that's why I think it might be something different in your installation.

Are you getting any warnings about discarded resources when compiling it? Emptyfiles_zip is a resource of the XlsAdapter package. Whenever you use FlexCel.XlsAdapter, that resource should be automatically included in your app. You should never need to add it manually. Maybe you are running with runtime packages and delphi is finding an older bpl?  Note that Emptyfiles_zip is a kind of new thing, it was added in 6.5 as a way to reduce a little the size of the exe. Before they were all unzipped resources and that took more space. So if you are using an older FlexCel_XlsAdapter.bpl tit might not contain the resource.

Can you send me the compiled exe you are getting to adrian@tmssoftware.com, or better if possible upload it somewhere like dropbox and send me the link?  (because I am afraid that if you try to send me an exe by email it will probably never arrive)

I honestly have no much more ideas on why it might not be finding emptyfiles_zip.

About the scaled property, the idea of the examples is to change as little as possible from the Delphi defaults. It is true that "scale" doesn't work well, but "scale = false" doesn't either. To make this work nice we would have to add a lot of code, probably more than the one showing how to use FlexCel itself. And the purpose of the demos is to show how to use FlexCel, not how to create an UI that scales properly to higher dpis. All the extra code we add for this (or other similar stuff) is just making it harder to see the "FlexCel" code which is the only thing we really want to show. I wouldn't myself make my apps like I make the demos, there wouldn't for example be any code in the control handlers, there might be some MVC here and there, but as said the idea here is to show how to use FlexCel, not how to make a nice UI. There are thousands of resources for the latter, while the info in FlexCel is only here.

But I will look to see if there is any way to make this look nicer in higher dpis screens anyway. I can't promise anything, because "scaled = false" isn't really a solution (things would be too small in a device like the surface, with more than 200%  large fonts). Normally my method (since Windows 95 times) to handle this stuff with delphi is to code at 96 dpi in Delphi. Then the form will look fine in higuer dpis. But if you open the form in Delhi at higher Dpis, it will most likely be completely wrong. The thing is, this is a problem embarcadero should fix (and with high priority if you ask me). Our demos are not here to show that stuff, only how to work with FlexCel.

Thanks for the quick response, which led me to the solution. We have a Finalbuilder project which builds our entire Delphi environment, and for some reason it did not re-build the RC files (even with the appropriate checkbox checked). I have made a note to check this so that hopefully I will remember on the next Flexcel upgrade. We do not use runtime packages, and I was able to resolve the problem by using the excellent resource explorer from NTCore.