如何比较列表并更新/填充其中之一的值?

时间:2019-04-17 18:54:48

标签: excel excel-formula

我有1900多种产品的清单(A2:A2000),在下一列中,我有售出的数量(B2:B2000)。然后,我列出了约500种商品(D2:C500),其中包括上个季度售出的新商品(E2:D500)很少。

我想要一个搜索产品名称并填充新列表中的值的公式

static void downloadFileSection(int begin, int end, int marker, String[] segmentURLs, String segID) {
        try(var file = FileChannel.open(Path.of(segID + "_" + marker + ".seg"), WRITE, CREATE)){
            var byteArrayHandler = BodyHandlers.ofByteArray();

            IntStream.range(begin, end)
                      .forEach(index -> {

                          System.out.println("Downloading segment: " + index);

                          try {
                              //This is the part that I think is wrong. I shouldn't be creating a ByteBuffer every segment download.
                              //Main.sendNormalRequest is a method that sends a request using java 11-s HttpClient.send method.
                              file.write(ByteBuffer.wrap(Main.sendNormalRequest(segmentURLs[index], byteArrayHandler).body()));
                          } catch (IOException e) {
                              e.printStackTrace();
                          }
                      });
        }catch (IOException e) {
            e.printStackTrace();
        }
    }

0 个答案:

没有答案