Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7012763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:17:53+00:00 2026-05-27T22:17:53+00:00

I have found one open source project with the basic excel functionality, write cell,

  • 0

I have found one open source project with the basic excel functionality, write cell, write int to cell, change color, font and stuff. One thing is missing, and its add Formula, and I was unable to implement it, so if any one know how to do it it would be great.

BIFF Formats:

internal sealed class BIFF
    {
        public const ushort DefaultColor = 0x7fff;

        public const ushort BOFRecord = 0x0209;
        public const ushort EOFRecord = 0x0A;

        public const ushort FontRecord = 0x0231;
        public const ushort FormatRecord = 0x001E;
        public const ushort LabelRecord = 0x0204;
        public const ushort WindowProtectRecord = 0x0019;
        public const ushort XFRecord = 0x0243;
        public const ushort HeaderRecord = 0x0014;
        public const ushort FooterRecord = 0x0015;
        public const ushort ExtendedRecord = 0x0243;
        public const ushort StyleRecord = 0x0293;
        public const ushort CodepageRecord = 0x0042;
        public const ushort NumberRecord = 0x0203;
        public const ushort ColumnInfoRecord = 0x007D;       

    }

example method for writing int and string

private void WriteStringCell(BinaryWriter writer, CellInfo cell)
        {
            string value;
            if (cell.Value is string)
                value = (string)cell.Value;
            else
                value = cell.Value.ToString();
            if (value.Length > 255)
                value = value.Substring(0, 255);
            ushort[] clData = { BIFF.LabelRecord, 0, 0, 0, 0, 0 };
            byte[] plainText = Encoding.GetEncoding(CodePage).GetBytes(value);
            int iLen = plainText.Length;
            clData[1] = (ushort)(8 + iLen);
            clData[2] = (ushort)cell.Row;
            clData[3] = (ushort)cell.Column;
            clData[4] = (ushort)cell.FXIndex;
            clData[5] = (ushort)iLen;
            WriteUshortArray(writer, clData);
            writer.Write(plainText);
        }
private void WriteNumberCell(BinaryWriter writer, CellInfo cell)
        {
            double dValue = Convert.ToDouble(cell.Value);
            ushort[] clData = { BIFF.NumberRecord, 14, (ushort)cell.Row, (ushort)cell.Column, (ushort)cell.FXIndex };
            WriteUshortArray(writer, clData);
            writer.Write(dValue);
        }

you can download source code from link provided. So what I want is to have a method WriteFromulaCell that will write formula into excel. No success at all.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:17:54+00:00Added an answer on May 27, 2026 at 10:17 pm

    Try using NPOI, it has capability of adding formula, it’s open source and free, or there is a also another open source xls project: excellibrary. Both project claiming full BIFF implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a basic profiler for an open source project. One requirement is
Okay, I have reached a sort of an impasse. In my open source project,
I have an open source project which I had been actively developing JStock -
I have found a number of articles such as this one that talk about
Hopefully a simple question although one I have found impossible to answer myself using
I have Ubuntu Linux. I found one command will let me download unread message
What's the easiest method people have found to monitor memcached on Windows? One method
We've recently upgraded one of our SSRS2005 servers to SSRS2008 and have found that
One thing I have continually found very confusing about using an object database like
All the googling around hasn't found an answer for me yet... I have one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.