title: GCP bucket stream was not opened for writing with openxml sdk c#
body: <p>I am struggling with modifying the data in stream which i got from google cloud bucket. Here is the code to get the stream -</p>
  <pre><code>var storageService = new StorageService(new BaseClientService.Initializer()
                  {
                     HttpClientInitializer = googleCredential,
                  });
      
                  var getRequest = storageService.Objects.Get(bucketName, fileName);
      
                  var stream = await getRequest.ExecuteAsStreamAsync();
  </code></pre>
  <p>Then i am using openxml sdk to modify this stream with some token replacement and then download a new document in browser.</p>
  <pre><code>   public static void ReplaceTokens(Stream stream, DocumentTemplateTokenData data)
        {
           try
           {          
              using (var doc = WordprocessingDocument.Open(stream, true))
              {
  // token replacement in doc
  
              }
  }
  catch(exception ex)
  {}
  </code></pre>
  <p>this is giving me error that stream was not opened to writing. PLease help, already wasted lot of time trying many solutions.</p>