Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
f7ba686f
Commit
f7ba686f
authored
May 15, 2017
by
Sergey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TestDocsWithChart
parent
c41385e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
1 deletion
+41
-1
Test/Applications/TestDocsWithChart/TestDocsWithChart/Program.cs
...plications/TestDocsWithChart/TestDocsWithChart/Program.cs
+41
-1
No files found.
Test/Applications/TestDocsWithChart/TestDocsWithChart/Program.cs
View file @
f7ba686f
...
...
@@ -45,7 +45,8 @@ namespace TestDocsWithChart
{
static
void
Main
(
string
[]
args
)
{
getFilesPivot
();
getFilesConditional
();
//getFilesPivot();
//getFilesAlternateContent();
//getFiles();
//convertFiles();
...
...
@@ -74,6 +75,45 @@ namespace TestDocsWithChart
}
}
static
void
getFilesConditional
()
{
//string sFindText = "conditionalFormatting";
//string sDirInput = @"\\192.168.3.208\allusers\Files\XLSX";
//string sDirOutput = @"D:\Files\Conditional";
string
sFindText
=
"type=\"expression\""
;
string
sDirInput
=
@"D:\Files\Conditional"
;
string
sDirOutput
=
@"D:\Files\ConditionalFormulaExpression"
;
String
[]
allfiles
=
System
.
IO
.
Directory
.
GetFiles
(
sDirInput
,
"*.*"
,
System
.
IO
.
SearchOption
.
AllDirectories
);
for
(
var
i
=
0
;
i
<
allfiles
.
Length
;
++
i
)
{
string
file
=
allfiles
[
i
];
try
{
ZipArchive
zip
=
ZipFile
.
OpenRead
(
file
);
string
sOutputPath
=
Path
.
Combine
(
sDirOutput
,
Path
.
GetFileName
(
file
));
foreach
(
ZipArchiveEntry
entry
in
zip
.
Entries
)
{
if
(
entry
.
FullName
.
EndsWith
(
".xml"
,
StringComparison
.
OrdinalIgnoreCase
))
{
using
(
StreamReader
reader
=
new
StreamReader
(
entry
.
Open
(),
Encoding
.
UTF8
))
{
string
sXml
=
reader
.
ReadToEnd
();
if
(-
1
!=
sXml
.
IndexOf
(
sFindText
))
{
System
.
IO
.
File
.
Copy
(
file
,
sOutputPath
,
true
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
}
}
static
void
getFilesAlternateContent
()
{
string
sAlternateContent
=
":Choice "
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment