This project is read-only.

Error in translation

Topics: Developer Forum
Dec 1, 2009 at 6:01 PM

Hello,
When I translate C# code

        private static Workbook GenerateWorkbookPart1()
        {
            var element = 
                new Workbook(
                    new FileVersion(){ ApplicationName = "xl", LastEdited = "4", LowestEdited = "4", BuildVersion = "4505" },
                    new WorkbookProperties(){ DefaultThemeVersion = (UInt32Value)124226U },
                    new BookViews(
                        new WorkbookView(){ XWindow = 120, YWindow = 135, WindowWidth = (UInt32Value)10005U, WindowHeight = (UInt32Value)10005U }),
                    new Sheets(
                        new Sheet(){ Name = "Données horaire", SheetId = (UInt32Value)1U, Id = "rId1" },
                        new Sheet(){ Name = "Graphique horaire", SheetId = (UInt32Value)2U, Id = "rId2" }),
                    new CalculationProperties(){ CalculationId = (UInt32Value)124519U });
            return element;
        }

 I obtain an error : 

Erreur rencontrée par le parseur: Line 5 col 38: ")" expected

==== var element =
==== new Workbook(
==>> new FileVersion(){ ApplicationName = "xl", LastEdited = "4", LowestEdited = "4", BuildVersion = "4505" },
==== new WorkbookProperties(){ DefaultThemeVersion = (UInt32Value)124226U },
==== new BookViews(

however the code is good.

Thus how to translate in vb.net
Beforehand thank you