@@ -54,45 +54,34 @@ XER, XLSX, HTML, XML, TXT, TIF, SVG, PNG, JPEG
54
54
55
55
Register an account at [ Aspose Cloud Dashboard] ( https://dashboard.aspose.cloud/#/apps ) to get you application information. Next, execute ` Install-Package Aspose.Tasks-Cloud ` from the Package Manager Console in Visual Studio to fetch & reference Aspose.Tasks Cloud SDK assembly in your project. If you already have Aspose.Tasks Cloud SDK for .NET, execute ` Update-Package Aspose.Tasks-Cloud ` to get the latest version. You may alternatively install the package from command line as ` nuget install Aspose.Tasks-Cloud ` .
56
56
57
- ## Convert MPP to CSV in the Cloud
57
+ ## Convert MPP Project File to CSV in C# .Net
58
58
59
59
``` csharp
60
- // For complete examples and data files, please go to https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-dotnet/
61
- var remoteName = await UploadFileToStorageAsync (" template.mpp" );
62
-
63
- // SaveOptions parameters is a json-serialized representation of
64
- // Aspose.Tasks's SaveOptions class or its format-specific inheritors (Like CsvOptions, etc):
65
-
66
- var saveOptionsSerialized = " { \" TextDelimiter\" :\" Comma\" , \" IncludeHeaders\" :false,\" NonExistingTestProperty\" :false," +
67
- " \" View\" :{ \" Columns\" :[{Type:\" GanttChartColumn\" ,\" Name\" :\" TestColumn1\" ,\" Property\" :\" Name\" ,\" Width\" :120}," +
68
- " {Type:\" GanttChartColumn\" ,\" Name\" :\" TestColumn2\" ,\" Property\" :\" Duration\" ,\" Width\" :120}]}}" ;
69
-
70
- var saveOptions = JObject .Parse (saveOptionsSerialized );
71
-
72
- var response = await TasksApi .PostTaskDocumentWithFormatAsync (new PostTaskDocumentWithFormatRequest
73
- {
74
- Format = ProjectFileFormat .Csv ,
75
- Name = remoteName ,
76
- Folder = this .DataFolder ,
77
- SaveOptions = saveOptions
78
- });
79
-
80
- Assert .IsNotNull (response );
81
- Assert .IsTrue (response .Length > 0 );
82
- response .Seek (0 , SeekOrigin .Begin );
83
-
84
- using (var sr = new StreamReader (response ))
85
- {
86
- var line1 = sr .ReadLine ();
87
- Assert .AreEqual (" Five to Eight Weeks Before Moving,16 days" , line1 );
88
- }
60
+ // Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
61
+ var config = new Configuration
62
+ {
63
+ AppSid = " MY_CLIENT_ID" ,
64
+ AppKey = " MY_CLIENT_SECRET"
65
+ };
66
+
67
+ var tasksApi = new TasksApi (config );
68
+ using (var inputStream = new FileStream (" template.mpp" , FileMode .Open ))
69
+ {
70
+ var uploadFileRequest = new PostCreateRequest (" template.mpp" , inputStream );
71
+ tasksApi .UploadFile (uploadFileRequest );
72
+ }
73
+
74
+ var request = new PostTaskDocumentWithFormatRequest ();
75
+ request .Name = " template.mpp" ;
76
+ request .Format = ProjectFileFormat .Csv ;
77
+ Stream response = tasksApi .PostTaskDocumentWithFormat (request );
89
78
```
90
79
91
80
## Aspose.Tasks Cloud SDKs in Popular Languages
92
81
93
82
| .NET | PHP | Python| Node.js | Go |
94
83
| ---| ---| ---| ---| ---|
95
84
| [ GitHub] ( https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-dotnet ) | [ GitHub] ( https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-php ) | [ GitHub] ( https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-python ) | [ GitHub] ( https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-node ) | [ GitHub] ( https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-go ) |
96
- | [ NuGet] ( https://www.nuget.org/packages/Aspose.tasks-Cloud/ ) | [ Composer] ( https://packagist.org/packages/aspose/tasks-cloud-php ) | [ PIP] ( https://pypi.org/project/aspose-tasks-cloud/ ) | [ NPM] ( https://www.npmjs.com/package/aspose-tasks-cloud ) | [ Go.Dev] ( https://pkg.go.dev/github.com/aspose-tasks-cloud/aspose-tasks-cloud-go/ ) |
85
+ | [ NuGet] ( https://www.nuget.org/packages/Aspose.tasks-Cloud/ ) | [ Composer] ( https://packagist.org/packages/aspose/tasks-cloud-php ) | [ PIP] ( https://pypi.org/project/aspose-tasks-cloud/ ) | [ NPM] ( https://www.npmjs.com/package/@asposecloud/ aspose-tasks-cloud ) | [ Go.Dev] ( https://pkg.go.dev/github.com/aspose-tasks-cloud/aspose-tasks-cloud-go/ ) |
97
86
98
87
[ Product Page] ( https://products.aspose.cloud/tasks/net ) | [ Documentation] ( https://docs.aspose.cloud/display/taskscloud/Home ) | [ API Reference] ( https://apireference.aspose.cloud/tasks/ ) | [ Code Samples] ( https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-dotnet ) | [ Blog] ( https://blog.aspose.cloud/category/tasks/ ) | [ Free Support] ( https://forum.aspose.cloud/c/tasks ) | [ Free Trial] ( https://dashboard.aspose.cloud/#/apps )
0 commit comments