Archive for the ‘Spreadsheet’ Category

Interfaces

Tuesday, 20th May, 2008

I have a few posts coming up about various coding stuff so I thought I would lay some of the groundwork.

An interface is the bit of something that gets exposed so you can interact with the bit that actually does the work. The classic example is a video recorder, the interface being the play/rewind buttons that we use to control whatever goes on inside, which most of us neither know or care about.

Same with a car, the interface is the driver controls, we don’t care about the engine, just that it wheelspins in 3rd when you hoof it. (must have been an ice patch officer (in July))

From a code point of view the interface is the set of externally accessible functions, variables, properties, methods, subs, or whatever. Some might only be accessible within the same project, some might be accessible from totally separate bits of code.

Same project is easy enough we often do that with public subs in modules in VBA. Making stuff visible from a different component though is a bit more challenging, especially in VBA, but the principle is the same.

Those nice people at Microsoft equipped Excel with several sets of externally accessible functions. One is the C API, this Application Programming Interface follows the C calling convention, and cannot be accessed by VB as VB doesn’t do the C calling convention. In fact this set of functions can only be accessed by real native code components so is out of (direct) reach of .net etc. I am going to cover this stuff in more detail as time goes on.

The other interface Excel exposes is a COM one, COM is much less picky than C so a great many languages can talk to Excel via this interface. VBA is probably the most common, but most languages can do it using something similar to CreateObject(’Excel.Application’) and then navigating the object model just as we do in VBA. I’m going to cover this later too, which could be fun.

The most useful point about interfaces is that they can stay stable whilst all the stuff in the background gets changed. (This is what that binary compatibility malarky was in VB6 - get that wrong and you eventually crashed your registry - anyone else do that?).

So in rough summary:

interface = bunch of procedures and variables that can be seen from outside.

stable interface = good, frequent interface changes = bad (all clients affected)

Feel free to add or remove or correct in the comments

cheers

Simon

Top quote

Monday, 19th May, 2008

Vista functions like a bloated asthmatic slug towing a caravan full of elephants to a carnival.

I don’t use Vista so couldn’t comment on the accuracy, but I think its a very eloquent summary.

cheers

Simon

OpenOffice downloads

Saturday, 17th May, 2008

I found this chart whilst wondering how the office suite marketshare had changed since the arrival of MSO2007.

Sadly the chart looks like a great candidate for Ross’ PPP (Piss Poor Presentation) collection, but what I think its saying is 2.7 million downloads in the last 30 days. It could be saying 600k per day (or 2 days?), but the narrative suggests the 2.7 million.

Of course downloads is only part of the picture as OOo is free on the cover of many computer magazines. And Google gives away its sibling Star Office. And then there are the various forks to target different areas, and the Novell version.

Really I was wondering was OpenOffice in part responsible to the extraordinary MAC Office VBA U-turn. I say extraordinary mainly because of the timing, its unusual to torpedo a product so soon after its release.

Imagine if 6 months ago MS had held their hands up and said O14 will have a classic UI option, what would have been the impact on O2007 sales? (IMO, it would have shafted 2007, of course if you are a ribbon sympathiser you’d see it differently).

Do you reckon OOo is impacting MS decisions? Do you think OOo is becoming (or already is) a force to be reckoned with?

Experience suggests that MS respond well to competition so I hope they do feel some Office suite heat.

Do you think other apps (/companies) are affecting their Office thinking too? I know they wished they were born Google, so I’m thinking more of the desktop (remember that?).

Cheers

Simon

Macro recorder 2

Friday, 16th May, 2008

So lots of people find the MR useful, me too. Especially when the documentation is completely nonsensical.

So who misses ‘record at mark’?

Who can remember when that was quietly retired? (97?)

Stephen Bullen has an add-in to put it back here.

For those of you too young to remember Excel 95, record at mark allowed you to record directly within a routine you were part way through. Instead of the more modern more clumsy always creating a new sub that you have to cut and paste from. In the olden days, if you got everything set up right (right selection etc) you could record the vba for a single operation within a loop, stop, select another line record another operation and so on. No copying no pasting (in theory). Me I always ended up cutting pasting or deleting, or correcting references.

I must admit I’m happy to keep the junk I record away from hand written code. what about you?

cheers

Simon

Macro recorder

Wednesday, 14th May, 2008

A few people have suggested a working macro recorder would be their top priority for a VBA update.

Personally I think the MR is important, but my top priority would be a decent IDE like VSTA or VSTO.

which would you prefer in a future version of Office

  1. VSTA with VB.net, C# etc fully integrated, but poor (but improving) Macro recorder support, or
  2. Just the current VBAIDE but with better macro support?
  3. Some other realistic (constrained) combination?

(I am assuming that the VSTA editor would be in addition to the current VBAIDE as in infopath.)

Just wondering as I would opt for 1 every time. the MR is fantastically useful, especially around charts and shapes etc. But I think its ok for the time being as it is, and a better IDE would be more valuable in the immediate term. Next job after a decent IDE - macro recorder for sure, but in my view not before. What do you think?

cheers

Simon

VBA - She is alive!!

Tuesday, 13th May, 2008

MAC VBA really was just pining for the fjords afterall.

And from MS themselves:

From MacBU at MS

Fascinating news that VBA will be reintroduced in the next version of MS Office for Macs.

‘kin ‘ell!! thats a bit of a surprise!!

A couple of things spring to mind

  • I think MS have always been good listeners, recently though they have often acted too (too late for VB6 alas)
  • Please please please can Office 14 VBA have tabbed editor at least? please?

What do you think? big issue? non issue? how much do you read into it for Windows Office? what about the timing? Good news? bad news?

Me I think this is big news, great timing, mid cycle in Office 14 to re-affirm commitment to VB(A). I guess they could be referring to a VSTA .net thing, which is fine by me as long as the compatibility (backwards and cross platform) story is viable.

What do you reckon??

cheers

Simon

Data types 2

Wednesday, 7th May, 2008

I’m surprised that I seem to be the only one who often knows the data type I expect. Maybe I should do less ‘poor mans ETL’ type work?

Would it be useful then if cells could have a fixed data type? one that didn’t get overwritten by pasting (unlike the rather flimsy data validation)? one that was at the cell level, not in the cell entry event (unlike the flimsy data validation*)

*What I mean here is is if you have a formula in a cell (with data validation) that results in a valid value, everything is fine. If you then change one of the precedents of that formula to give a invalid result, the data validation does not trigger. - I’m not saying thats bad or wrong, what I am saying is something that was more robust be useful?

Also what do you think of being able to give cells a unit (like miles, km, hours or something) that could then be used to check you are not doing something dumb. (I’ve lost count of the number of times I’ve added pounds, dollars, yen, and euros or whatever - luckily having the yen in there make that blunder obvious). I’ve heard this units suggestion a few times, I’m not sure how much use I would make of it, what about you?

cheers

Simon

Microhoo

Sunday, 4th May, 2008

Thank goodness that nonsense is over. Perhaps now we can get back to focusing on a compelling desktop story.

(With Excel at the centre of course)

The bad news (poor Q1/Q3?? performance) got released and buried under the pile of Yahoo speculation. Job done.

I wonder what the diversion will be next quarter - buying Google? buying Red Hat? Windows 7 beta?

What do you reckon?

Did anyone seriously think buying Yahoo was a good thing? who for?

[EDIT]

I reckon Yahoos share price will plummet, MS could probably buy them for half the price in 6 months.

cheers

Simon

End User Development

Thursday, 1st May, 2008

We’ve had a few (sometimes lively) discussions about ‘our profession’, roles and responsibilities, IS/IT departments etc.

I thought I would just state my point of view and how that drives many of my posts in these sorts of areas. ‘Our profession’ sits somewhere around the end user developers, perhaps slightly more technical and slightly less business focused. What do you think?

I firmly believe that End User Development (EUD) is vital. I also think it should be encouraged and supported, and I know from research and personal experience that in many orgs it is not. Lack of user involvement is the number one reason for development failures.

I also believe that Excel/VBA is one of the (if not _THE_) most important end user development tools. Technically it may not be the best I accept, but culturally, in many of the numerate business disciplines it is the most familiar.

I totally accept that much EUD is not the best quality, however I would argue that if the customer is satisfied then its good enough. As the customer is the developer this only becomes an issue if systems get deployed beyond their original design brief. (assuming the user/dev is a responsible professional)

Much as I like VSTO and .net and like developing in them personally, I don’t really see them as EUD tools.

A refresh of the VBAIDE on the other hand would be a massive boost to EUD, as would integrating all that VSTO/VSTA/.net goodness into the basic Office setup and Excel and Access and maybe Word.

Those techs that I’m a bit lukewarm about are those that I see as having limited use to the EUD world which I see as so important. As IS/IT depts see Office as EUD and wouldn’t lower themselves to touch it, I wonder what will change to make these techs more popular - more responsibility to end users? or massive cultural change to IS/IT to find the love for Office dev?

Do you think EUD is important?

Do you think it is widely encouraged in the organisations you know?

How do you think these inbetweenie techs like VSTO, Excel services will get adopted?

Other thoughts?

cheers

Simon

Asus Eee 1.0 impressions

Tuesday, 29th April, 2008

I promised a further review when I had had chance the sample the delights of actually using the Eee (701) as a portable, rather than on my desk. (where its connected to a decent screen, keyboard and mouse)

I reviewed some research papers on it the other night whilst out and about. That saved my a ton of time.

Its very portable, not quite small enough to fit in my coat pocket, but easy enough to carry. And with the low price its not a massive risk to leave around, or get knocked. Plus the fact its not my main dev machine eases the worry

For reading PDFs and writing in OpenOffice Write it works very well. Calc works fine too, although with big spreadsheets you notice the cramped screen.

It had a flat battery so I charged it for an hour and a half, that was good for about 3/4 hour of what I would consider to be very light use. It claimed to be half full but I think they are meant to do about 3 hours. Anyway about an hour is enough on your lap I reckon before the RSI really kicks in. I’m pleased I was mainly paging up/down, I think using the trackpad for mousing around would have been hard work.

The screen although small is very clear, I was reading at about 80% zoom before I upped it to 120% or something to save my eyes.

It can project much better resolutions than it can display, but that means you only see a corner of the screen image on the machine, whereas the audience sees the whole thing. If you want to get interactive that becomes tricky.

In terms of the included Linux OS and app stack - this all works well and I find its fine for pretty much everything except developing for Windows/Office. The odd crappy web site doesn’t display right, but the main ones do. I havent invested the time I wanted to learning more about Linux so I’m still only scratching the surface. But that is the great improvement of modern Linux - you don’t need to be a ubergeek to boot the machine, its as simple as any other OS.

Performance is fine for most ‘normal’ stuff, apps can take a while to get going, and I wouldn’t call it snappy, some javascript sites really drag. I’m not sure I would want to try and run some of my spreadsheet monsters on it.

The newly announced 900 has a bigger screen (9″ instead of 7″) which excellent, its a bit bigger physically which is bearable, but has a daft power brick instead of the mobile phone style power lead of the 701, and its a 100 quid more. Dunno if I’ll get one, when they finally arrive. As I mainly use this one connected to an external screen the 900 doesn’t seem to offer much. We’ll see.

Anyone else got one, or similar?

cheers

Simon