xceedsoftware / DocX

Fast and easy to use .NET library that creates or modifies Microsoft Word files without installing Word.
Other
1.77k stars 472 forks source link

xamarin.ios and xamarin.android support #304

Open amirvenus opened 5 years ago

amirvenus commented 5 years ago

I am trying to use this library in Xamarin.Forms.

After spending some hours, I figured out I could add it to UWP by setting the permissions and adding System.IO.Packaging nuget although I really wonder why it does not append the text:


     using (DocX document = DocX.Create(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "temp.docx")))
            {
                // Add a new Paragraph to the document.
                Paragraph p = document.InsertParagraph();

                // Append some text.
                p.Append("Hello World").Font(new Xceed.Words.NET.Font("Arial Black"));

                // Save the document.
                document.Save();
            }

It creates the file but there is not Hello World inside it! I tried without specifying the font as well but still the file is empty!

Another issue I have is using it on iOS and Android:

Package DocX 1.3.0 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package DocX 1.3.0 supports: net40 (.NETFramework,Version=v4.0)

Package DocX 1.3.0 is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win. Package DocX 1.3.0 supports: net40 (.NETFramework,Version=v4.0)

XceedBoucherS commented 5 years ago

Hi, This version is not compatible for iOS and Android. You can try v1.6, which is available for free for 45 days here : https://xceed.com/xceed-words-for-net/ It support the .NETStandard for .NET Core app. Thank you.