I guess if you are asking this question you have no choice, still I wonder whether it's sane to generate online images by updating an Excel worksheet and then extracting images from it. I'm saying this because on a job I had somebody had this devious idea of composing letters by automating (via OLE) MS-Word document compositions. This idea proved awful, because:
- It was quite slow (but we can forgive this)
- It often broke with no apparent reason
- It was unable to cope with moderate-to-heavy concurrency
MS-Office programs were designed to be invocated and used by humans, so are not really fit as server-side components. If you have a choice, I believe you should investigate graphic creation modules (like GD) that are much more suit to the task.
Please note: I'm not saying you should not automate via Excel, just that it does not seem very fit to me for serving images through a (busy) web server.
About your question, I'd create the file and store it within a table with a key that's related to its information and a timestamp. If - to say - we are talking about stock data, I'd store a key like "XXX-60" to mean it's the stock symbol XXX and the graph is for 60 days. Then I'd store the blob with your GIF and a timestamp. On loading, I'd query the database for a "XXX-60" created within the last five minutes; if not found, I'd create it and replace the old version in the database. I would not go for "real" files; they're harder to keep track of, will fragment the file system, and you need a CGI with a database connection to serve the request in any case.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.