Mike Borozdin's Blog

A blog about programming, web and IT in general

Search

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© 2012 Mike Borozdin

PHPExcel: Manipulate Excel Spreadsheets with PHP on Linux

Have you ever faced a situation when you need to manipulate Excel spreadsheets with PHP on the server that is running Linux? If you had a Windows Server you could use PHP COM extensions. However they are unavailable on Linux.


Hopefully, there is a solution. It is called Open XML. It’s a new format of Microsoft Office documents introduced in Microsoft Office 2007. Basically, an Open XML file is a ZIP archive that contains XML files that represent the document mark-up. You can view it yourself or read some documentation, my article isn’t about Open XML, but about the PHP library for working with Excel 2007 files. It also supports Excel 97 format by incor porating a PEAR library.


The library is called PHPExcel. It allows you to read/write Excel spreadsheets, save them in many formats including PDF and HTML. It supports formulas,styles and etc. More...


Tags:
Posted on Monday, June 30, 2008
Comments (0)

In Search Of The Perfect UI

Do you remember your first experience of using a computer? It doesn’t matter whether it was DOS with Norton Commander or Windows. Anyway you had to learn how to find the necessary applications, how to execute them, once again it doesn’t matter whether you clicked on the folders and files on the blue background or used the Start menu. It’s important that you learnt the definitions or metaphors; you learnt that icon is an application or something else; you learnt that you have to click twice on it to open it and so on.


Having got used to those metaphors, we easily use a computer unless we face an application with a non-standard interface that confuses us because we have to learn again. More...


Tags:
Posted on Saturday, June 28, 2008
Comments (0)

Getting BlogEngine.NET To Work With The Local Time Zones: Part II (in case JavaScript is disabled)

In the article called "Getting BlogEngine.NET To Work With The Local Time Zones" I described how to convert the times of the posts to the local time zones of users relying solely on JavaScript. However I got a complaint that if JavaScript is disabled for some reasons, then no date and time are displayed. More...


Posted on Friday, June 27, 2008
Comments (0)

LINQ To MySQL

LINQ to SQL is a great tool that saves a lot of time. However it has one disadvantage – it supports only SQL Server. Anyway it’s possible to write your own LINQ provider. Sure, there is one for MySQL. It is called DbLinq, in fact in supports many databases:

  • MySQL
  • Oracle
  • PostreSql
  • Ingress
  • SqlLite

It’s not finished yet, however you can still try to use it. I’m going to explain how to use it in this article; we’ll go through 3 steps:

  1. Installation
  2. Using DbLinq in a console application
  3. Using DbLinq in a ASP.NET application

More...


Tags:
Posted on Thursday, June 26, 2008
Comments (11)

Users Never Read Manuals

I was in the store the other day paying for my mobile phone. There was a middle-aged woman in front of me who was trying to pay for her mobile phone with the payment machine. This payment machine was recently installed, so it was difficult for some people to get used to it. Even I saw the machine for the first time. Anyway that woman was nervously trying to pay, however she even couldn’t go further than entering her phone number, since I hadn’t any experience with that machine as well, I advised her to read the manual that was under the button in the bottom of the screen. She got angry when she heard my advice. Then I noticed that she just didn’t fill in the region code, I told her about that, she didn’t listen, got angry and went away. More...


Tags:
Posted on Tuesday, June 24, 2008
Comments (4)

A Practical Example Of Using The New Features Of ASP.NET 3.5

This tutorial doesn’t cover the theoretical basics of the new features and controls, instead it concentrates on the practical example of using the new features. This tutorial covers the following features:

  • LINQ (Language Integrated Query) for the data manipulations
  • ListView control for presenting the data
  • LinqDataSource for binding data
  • DataPager for pagination
  • ASP.NET AJAX for getting rid of the unncecesassary page reloads

Tags: ,
Posted on Sunday, June 22, 2008
Comments (8)

Getting BlogEngine.NET To Work With The Local Time Zones

I noticed that the times of posts and comments were displayed in my local time zone. It must be very confusing for the users, especially if those times were the times of the comments they posted.


The first idea that came to my mind was just to use the GMT time zone. I set up the time zone offset in the blog settings, changed the templates, basically, I just put “GMT” after the time.


Anyway that still wasn’t good enough. I wanted the times of the posts and comments to be displayed in the local time zones of my readers. More...


Posted on Thursday, June 19, 2008
Comments (5)

Syntax Highlighting In BlogEngine.NET

It is not obvious that BlogEngine.NET has a built-in syntax highlighting extension. I mean the current versions 1.3.1, I'm not sure about the old versions though. Anyway you can find it in the extensions settings, it is enabled by default.

So, if you need to paste a code snipped, just paste it in the text area and surround it with the [ code:<language>][/code ] tags

<language> may has one of the following values:

  • c#
  • vb
  • js
  • html
  • xml
  • tsql
  • msh (Windows PowerShell script language)

It can take some other parameters, like ln for toggling line numbers, however if you set this parameter your layout will get broken for some reasons.


Tags:
Posted on Wednesday, June 18, 2008
Comments (1)

Facebook Lose Millions

Of course, they don’t have the million losses; however they are missing millions of potential dollars and users.


You may have already heard about the Facebook clones. We have one in Russia, it’s called vkontakte.ru, there are more than 13 million registered users, while there are only about 80 thousand Russian users on Facebook.


Why? I mean why so many people in Russia use the clone instead of Facebook? Not only because the Facebook interface is English, but because it lacks Russian universities and schools, so it doesn’t fullfil its primary function – it doesn’t help people to find each other, it’s hard to find your classmates, it’s hard to find people you study in university with. I tried to add my university to the list, I wrote an e-mail, but for some reasons it wasn’t added. More...


Tags:
Posted on Monday, June 16, 2008
Comments (0)

Difference Between Label.Text And TextBox.Text (WinForms) In Treating Line Breaks

I had a small project recently that outputted the results of some calculations to the label on the form, I replaced the label with a textbox and noticed that instead of the line breaks I had in the label I got a bunch of non-printed characters. More...


Tags:
Posted on Saturday, June 14, 2008
Comments (0)