Free Support Forum -

Read ICS File


The requirement is to read multiple *.ics files each containing multiple appointments and write them to SQL.

We have Aspose.Network and Aspose.iCalendar.

Can we achieve our goals using our current products or do we need something else?

Many thanks.

Hi Dean,

Thanks for writing to Aspose.Email support team.

Aspose.Network is replaced by Aspose.Email which is quite a rich library to work on emails, exchange server, outlook items and so on. Aspose.Network is discontinued here and support is available for Aspose.Email in this regard. You may visit the Migration from Aspose.Network to Aspose.Email section of our online documentation for more information.

You may use Aspose.Email for .NET with the following sample code. The resultant byte array can be saved in the SQL database. Online programmers guide is available here which provides detailed information about the Aspose.Email for .NET features.

//Load licence
License license = new License();

//load calendar item
Appointment appointment = Appointment.Load(“TestCalendarwith4Appointments.ics”);

//declare memory stream
MemoryStream memStr = new MemoryStream();

//save data to memory stream

//convert memory stream to bytes array
byte[] buffer = memStr.ToArray();

Please feel free to write us if you have any further queries.

Thank you for the update.

Are there any methods of the Appointment class to work with a single appointment in the ics file?

I load in the ics file to an Appointment object. Say the ics file contains 1000 appointments. We need to traverse the ics(xml) file, get individual appointment details, subject, start and end time etc and write that to our custom SQL appointment table. Continue through the current ics file until all appointments have been written to the DB and then process the next incoming ics file.

Are there any classes in Aspose.Email to work with the xml held within an ics file?

Many thanks

Hi dean,

I have analyzed the requirement and afraid to inform that currently no such class or feature is available which can be utilized for parsing the ics(xml) to extract appointments. This task may be accomplished using some manual parsing of the xml to extract the appointments.

I will discuss this matter with the development team and may need a sample ICS file (having multiple appointments) for further analysis. Could you please send a sample file which I can share with the developers for this purpose.


Many many thanks for being so prompt.

There is no need to go any further, you have answered my question thoroughly.